diff --git a/src/components/ui/radio-group.tsx b/src/components/ui/radio-group.tsx new file mode 100644 index 0000000..b7e26ab --- /dev/null +++ b/src/components/ui/radio-group.tsx @@ -0,0 +1,35 @@ +import { Radio as RadioPrimitive } from "@base-ui/react/radio" +import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group" +import { cn } from "@/lib/utils" + +function RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) { + return ( + + ) +} + +function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) { + return ( + + + + + + ) +} + +export { RadioGroup, RadioGroupItem } diff --git a/src/screens/admin/Permissions.tsx b/src/screens/admin/Permissions.tsx index 03cd4ba..a1810a8 100644 --- a/src/screens/admin/Permissions.tsx +++ b/src/screens/admin/Permissions.tsx @@ -1,6 +1,7 @@ import type { ReactNode } from 'react' import { useCallback, useEffect, useState } from 'react' import { Button } from '../../ui/Button' +import { Tick } from '../../ui/Tick' import { Dialog } from '../../ui/Dialog' import { SectionHeader } from '../../ui/SectionHeader' import { SectionIndex } from '../../ui/SectionIndex' @@ -564,31 +565,31 @@ function PermissionsTable({ {f.name} - set(f, { canView: e.target.checked })} - /> + + set(f, { canView: v })} + /> + - set(f, { canModify: e.target.checked })} - /> + + set(f, { canModify: v })} + /> + - set(f, { canDelete: e.target.checked })} - /> + + set(f, { canDelete: v })} + /> + diff --git a/src/screens/blocking/BlockLists.module.css b/src/screens/blocking/BlockLists.module.css index 96eaf2c..e334a48 100644 --- a/src/screens/blocking/BlockLists.module.css +++ b/src/screens/blocking/BlockLists.module.css @@ -63,7 +63,7 @@ row's name goes in `aria-label` instead, as the table checkboxes of Zones do. It takes BOTH classes `Check` gives its own DOM: `check` on the label (the 26 px target and the input's alignment) and `toggle` for the switch drawing. */ -.switch { composes: check toggle from '../../ui/Check.module.css'; } +.switch { composes: check from '../../ui/Check.module.css'; } .name { font-weight: 600; } /* The URL wraps after its separators (`ui/UrlText`), not at whatever letter meets the diff --git a/src/screens/blocking/BlockLists.tsx b/src/screens/blocking/BlockLists.tsx index 8fd8404..e6c2587 100644 --- a/src/screens/blocking/BlockLists.tsx +++ b/src/screens/blocking/BlockLists.tsx @@ -9,6 +9,7 @@ import { DataTable } from '../../ui/DataTable' import { RowAction } from '../../ui/Table' import { Field, Input, Select } from '../../ui/Field' import { Button } from '../../ui/Button' +import { Tick } from '../../ui/Tick' import { PermissionButton } from '../../ui/PermissionButton' import { Confirm } from '../../ui/Confirm' import { Notifier } from '../../ui/Notifier' @@ -768,9 +769,9 @@ export function BlockLists({ return ( canToggle(l) && (