import * as React from 'react'; import type { Meta } from '@storybook/react'; import { ToggleSwitch as Component, ToggleSwitchProps as Props } from '.'; const LENGTH = 3 as const; const meta: Meta = { component: Component, argTypes: { checkedLabel: { control: { type: 'text', }, }, subtext: { control: { type: 'text', }, }, uncheckedLabel: { control: { type: 'text', }, }, onChange: { table: { disable: true, }, action: 'changed', }, }, args: { ...(Component.defaultProps ?? {}), checkedLabel: Component.displayName, }, }; export const ToggleSwitch = (args: Omit) => ( <> {Array.from({ length: LENGTH }).map((_, i) => ( ))} ); export default meta;