import React, { useState } from 'react'; import { Center, Switch, VStack } from '../../../ui-components'; import Wrapper from '../../Wrapper'; export const SwitchStory = ({ isDisabled, isEnabled: isEnabledProp, ...props }: any) => { const [isEnabled, setIsEnabled] = useState(false); React.useEffect(() => { if (!isDisabled) setIsEnabled(isEnabledProp); }, [isEnabledProp, isDisabled]); return (
setIsEnabled(val)} isDisabled={isDisabled} {...props} />
); }; export { Switch, VStack };