feat(@ui): migrate checkbox component

This commit is contained in:
Paul Makles
2022-05-29 16:34:54 +01:00
parent 20d31babce
commit 4bcfa601a5
18 changed files with 239 additions and 361 deletions

View File

@@ -7,8 +7,7 @@ import styled, { css } from "styled-components";
import { Text } from "preact-i18n";
import { useMemo } from "preact/hooks";
import Checkbox from "../../ui/Checkbox";
import { OverrideSwitch } from "@revoltchat/ui";
import { Checkbox, OverrideSwitch } from "@revoltchat/ui";
interface PermissionSelectProps {
id: keyof typeof Permission;
@@ -136,7 +135,7 @@ export function PermissionSelect({
) : (
<Checkbox
disabled={disabled}
checked={state === "Allow"}
value={state === "Allow"}
onChange={() =>
onChange(
Long.fromNumber(value, false)