import { Meta, StoryFn, StoryObj } from '@storybook/react'; import React, { useState } from 'react'; import { ExternalLink } from '../../ExternalLink'; import { Typography } from '../../Typography'; import { CheckboxField } from '.'; export default { args: {}, component: CheckboxField, title: 'Components/Fields/CheckboxField', } as Meta; const Template: StoryFn = (args) => { const [checked, setChecked] = useState(args.checked); return ; }; export const Default: StoryObj = { args: { text: ( Do you agree? ), }, render: Template, }; export const WithChecked: StoryObj = { args: { checked: true, text: ( Do you agree? ), }, render: Template, }; export const WithDisabled: StoryObj = { args: { checked: true, disabled: true, text: ( Do you agree? ), }, render: Template, }; export const WithError: StoryObj = { args: { checked: true, error: true, text: ( Do you agree? ), }, render: Template, }; export const WithSize: StoryObj = { args: { checked: true, size: 32, text: ( Do you agree? ), }, render: Template, }; export const WithComplexText: StoryObj = { args: { text: ( Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.{' '} Link Text {' '} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ), }, render: Template, };