mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-11 11:05:28 +00:00
feat(@ui): migrate checkbox component
This commit is contained in:
@@ -3,14 +3,14 @@ import { observer } from "mobx-react-lite";
|
||||
import styles from "./Panes.module.scss";
|
||||
import { Text } from "preact-i18n";
|
||||
|
||||
import { Checkbox } from "@revoltchat/ui";
|
||||
|
||||
import { useApplicationState } from "../../../mobx/State";
|
||||
import {
|
||||
AVAILABLE_EXPERIMENTS,
|
||||
EXPERIMENTS,
|
||||
} from "../../../mobx/stores/Experiments";
|
||||
|
||||
import Checkbox from "../../../components/ui/Checkbox";
|
||||
|
||||
export const ExperimentsPage = observer(() => {
|
||||
const experiments = useApplicationState().experiments;
|
||||
|
||||
@@ -22,11 +22,11 @@ export const ExperimentsPage = observer(() => {
|
||||
{AVAILABLE_EXPERIMENTS.map((key) => (
|
||||
<Checkbox
|
||||
key={key}
|
||||
checked={experiments.isEnabled(key)}
|
||||
value={experiments.isEnabled(key)}
|
||||
onChange={(enabled) => experiments.setEnabled(key, enabled)}
|
||||
description={EXPERIMENTS[key].description}>
|
||||
{EXPERIMENTS[key].title}
|
||||
</Checkbox>
|
||||
description={EXPERIMENTS[key].description}
|
||||
title={EXPERIMENTS[key].title}
|
||||
/>
|
||||
))}
|
||||
{AVAILABLE_EXPERIMENTS.length === 0 && (
|
||||
<div className={styles.empty}>
|
||||
|
||||
Reference in New Issue
Block a user