diff --git a/src/components/ui/Toggle/Toggle.tsx b/src/components/ui/Toggle/Toggle.tsx index 73a60c5d..1fcd4369 100644 --- a/src/components/ui/Toggle/Toggle.tsx +++ b/src/components/ui/Toggle/Toggle.tsx @@ -17,8 +17,16 @@ export type ToggleProps = { }; -const Toggle =({defaultPressed, customRootClass = '', children, className = '', pressed, onChange, ...props -}:ToggleProps) => { +const Toggle: React.FC = ({ + defaultPressed, + customRootClass = '', + children, + className = '', + pressed, + onChange, + ...props +}) => { + const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME); const [isPressed, setIsPressed] = useState(pressed || defaultPressed);