From b7f6db45894ef82f25489c78f71a7f35e53166fc Mon Sep 17 00:00:00 2001 From: jyoti Date: Mon, 11 Nov 2024 12:43:42 -0800 Subject: [PATCH] update toggle file --- src/components/ui/Toggle/Toggle.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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);