import React from 'react' import { Toggle } from '../' import { Action, actions, HIDE_CONTROL, Story } from '../helpers/storybook' export default { title: 'Toggle', component: Toggle, argTypes: { checked: HIDE_CONTROL, ...actions('onChange', 'onFocus', 'onBlur') }, } as const type TStory = Story }> export const BasicUsage: TStory = (args) => { const [checked, setChecked] = React.useState(false) const onChange = args.onChange.wrap(setChecked, true) return } BasicUsage.args = { name: 'toggle' }