form: fix switch required, add root form error to media settings

This commit is contained in:
dswbx
2025-02-08 13:27:47 +01:00
parent 97b0ff24c8
commit 3fa682bfe1
8 changed files with 74 additions and 21 deletions

View File

@@ -186,7 +186,7 @@ export const Switch = forwardRef<
onChange?: (e: { target: { value: boolean } }) => void;
onCheckedChange?: (checked: boolean) => void;
}
>(({ type, ...props }, ref) => {
>(({ type, required, ...props }, ref) => {
return (
<RadixSwitch.Root
className="relative h-7 w-12 p-[2px] cursor-pointer rounded-full bg-muted border border-primary/10 outline-none data-[state=checked]:bg-primary/75 appearance-none transition-colors hover:bg-muted/80"