diff --git a/src/components/ui/Switch/Switch.tsx b/src/components/ui/Switch/Switch.tsx index 2e7b78f..0d625ff 100644 --- a/src/components/ui/Switch/Switch.tsx +++ b/src/components/ui/Switch/Switch.tsx @@ -1,55 +1,18 @@ import * as RadixSwitch from '@radix-ui/react-switch'; -import clsx from 'clsx'; -import {useId} from 'react'; type SwitchProps = { readonly isOn: boolean; readonly setIsOn: (checked: boolean) => void; - readonly labels?: [string, string]; }; -export function Switch({labels, isOn, setIsOn}: SwitchProps) { - const id = useId(); +export function Switch({isOn, setIsOn}: SwitchProps) { return ( -
- {labels && ( - - )} - - - - {labels && ( - - )} -
- ); -} - -type LabelProps = { - readonly htmlFor: string; - readonly children: string; - readonly isActive: boolean; -}; - -function Label({htmlFor, children, isActive}: LabelProps) { - return ( - + + ); }