import { Meta, Story } from '@storybook/react';
import { useState } from 'react';
import { Switch } from './Switch';
export default {
title: 'Components/Form/SwitchField/Switch',
} as Meta;
export function Example() {
const [isChecked, setIsChecked] = useState(false);
function onChange() {
setIsChecked(!isChecked);
}
return ;
}
interface Args {
checked: boolean;
}
function Template({ checked }: Args) {
return {}} id="id" />;
}
export const Checked: Story = Template.bind({});
Checked.args = {
checked: true,
};
export const Unchecked: Story = Template.bind({});
Unchecked.args = {
checked: false,
};