input-switch.stories.tsx 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import OLFormSwitch from '@/shared/components/ol/ol-form-switch'
  2. import { figmaDesignUrl } from '../../../.storybook/utils/figma-design-url'
  3. type Args = React.ComponentProps<typeof OLFormSwitch>
  4. export const Unchecked = (args: Args) => {
  5. return <OLFormSwitch onChange={() => {}} checked={false} {...args} />
  6. }
  7. export const UncheckedDisabled = (args: Args) => {
  8. return <OLFormSwitch onChange={() => {}} checked={false} disabled {...args} />
  9. }
  10. export const Checked = (args: Args) => {
  11. return <OLFormSwitch onChange={() => {}} checked {...args} />
  12. }
  13. export const CheckedDisabled = (args: Args) => {
  14. return <OLFormSwitch onChange={() => {}} checked disabled {...args} />
  15. }
  16. export default {
  17. title: 'Shared / Components / Input Switch',
  18. component: OLFormSwitch,
  19. args: {
  20. checked: false,
  21. disabled: false,
  22. },
  23. parameters: {
  24. controls: {
  25. include: ['checked', 'disabled'],
  26. },
  27. ...figmaDesignUrl(
  28. 'https://www.figma.com/design/V7Ogph1Ocs4ux2A4WMNAh7/Overleaf---Components?node-id=3489-139487&m=dev'
  29. ),
  30. },
  31. }