import { action } from 'storybook/actions'; import { FastFlag as FastFlagIcon } from '@transferwise/icons'; import { useState } from 'react'; import { Nudge, Title, Typography } from '..'; import SwitchOption, { type SwitchOptionProps } from './SwitchOption'; /** * > ⚠️ This component is **deprecated** and superseded by the [new ListItem component](?path=/docs/content-listitem--docs) with the [ListItem.Switch control](?path=/docs/content-listitem-listitem-switch--docs) * (run codemod to migrate: **`npx @wise/wds-codemods@latest list-item`**). */ const meta = { component: SwitchOption, title: 'Option/SwitchOption', tags: ['deprecated'], argTypes: { title: { control: 'text' }, content: { control: 'text' }, disabled: { control: 'boolean' }, showMediaAtAllSizes: { control: 'boolean' }, isContainerAligned: { control: 'boolean' }, checked: { control: 'boolean' }, }, args: { title: 'Switch option', content: 'Normally, the button and icon are vertically centered.', disabled: false, showMediaAtAllSizes: false, isContainerAligned: false, checked: false, id: 'id', complex: false, 'aria-label': 'Switch option', }, }; export default meta; function Template(args: SwitchOptionProps) { const [checked, setChecked] = useState(args.checked); return ( } checked={checked} onChange={setChecked} /> ); } export const Playground = { render: (args: SwitchOptionProps) =>