import React from 'react' import { CheckBoxCard, Flex, Text, TextInputField } from '../' import { Action, FIELD_ARGS, Story } from '../helpers/storybook' export default { title: 'CheckBoxCard', component: CheckBoxCard, parameters: { cactus: { overrides: { maxWidth: '700px' } } }, } as const export const BasicUsage = (): React.ReactElement => { const ref = React.useRef({ focus: () => document.getElementById('text')?.focus(), }) return ( Regular Above Checked Disabled Forever Title
Description Below
) } BasicUsage.parameters = { controls: { disable: true } } export const CheckBoxCardGroup: Story< typeof CheckBoxCard.Group, { buttonLabel: string onChange: Action> } > = ({ buttonLabel, onChange, ...args }) => { const [value, setValue] = React.useState(['left']) return ( setValue((old) => { if (target.checked) { return [...old, target.value] } return old.filter((x) => x !== target.value) }) )} > That's right That's wrong {buttonLabel} ) } CheckBoxCardGroup.argTypes = { ...FIELD_ARGS, buttonLabel: { name: 'button label' }, } CheckBoxCardGroup.args = { label: 'A Label', name: 'you-are-group-one', disabled: false, tooltip: 'Here there be checkboxes', autoTooltip: true, buttonLabel: 'Supercalifragilisticexpialidocious', }