Skip to content

Commit

Permalink
update toggle file
Browse files Browse the repository at this point in the history
  • Loading branch information
jindaljyoti committed Nov 11, 2024
1 parent 683ed66 commit b7f6db4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/ui/Toggle/Toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,16 @@ export type ToggleProps = {

};

const Toggle =({defaultPressed, customRootClass = '', children, className = '', pressed, onChange, ...props
}:ToggleProps) => {
const Toggle: React.FC<ToggleProps> = ({
defaultPressed,
customRootClass = '',
children,
className = '',
pressed,
onChange,
...props
}) => {

const rootClass = customClassSwitcher(customRootClass, COMPONENT_NAME);

const [isPressed, setIsPressed] = useState(pressed || defaultPressed);
Expand Down

0 comments on commit b7f6db4

Please sign in to comment.