import type { Meta, StoryObj } from '@storybook/react'; import { action } from 'storybook/actions'; import React from 'react'; import { RadioBox } from '..'; import { RadioGroup } from '../../RadioGroup'; import { SnapshotContainer } from '../../../test-utils/SnapshotsContainer'; const meta: Meta = { title: 'Form/RadioBox', component: RadioBox, args: { label: 'RadioBox Label', value: 'daily', description: 'This is the description of the RadioBox which helps to add some info and context to our users.', }, decorators: [ (Story) => (
), ], }; export default meta; type Story = StoryObj; export const Default: Story = { render: (args) => ( { action('onChange RadioGroup')(e); }} > ), }; export const Checked: Story = { render: (args) => ( { action('onChange RadioGroup')(e); }} > ), }; export const Disabled: Story = { render: (args) => ( { action('onChange RadioGroup')(e); }} > ), args: { isDisabled: true, }, }; export const DisabledAndChecked: Story = { render: (args) => ( { action('onChange RadioGroup')(e); }} > ), args: { isDisabled: true, }, }; export const WithoutDescription: Story = { render: (args) => ( { action('onChange RadioGroup')(e); }} > ), args: { description: null, }, }; export const WithIcon: Story = { args: { iconName: 'calendar', }, render: (args) => ( { action('onChange RadioGroup')(e); }} > ), }; export const WithIconWithoutDescription: Story = { args: { iconName: 'calendar', description: null, }, render: (args) => ( { action('onChange RadioGroup')(e); }} > ), }; export const Snapshot: Story = { parameters: { chromatic: { disableSnapshot: false }, }, render: () => ( ), };