import type { Meta, StoryObj } from '@storybook/react-vite'; import { RadioGroup, RadioGroupItem } from './radio-group'; import { Label } from '../label/label'; const meta = { title: 'Components/RadioGroup', component: RadioGroup, parameters: { layout: 'centered', docs: { description: { component: 'Mutually exclusive choice. Arrow keys move between options and only one stop appears in the tab order — that is the behaviour that makes it a radio group rather than a row of checkboxes.', }, }, }, tags: ['autodocs'], } satisfies Meta; export default meta; type Story = StoryObj; /** * CBAR marks the selected option by swelling the border until the untouched * centre becomes the dot, rather than drawing a dot inside a ring. */ export const Sizes: Story = { render: () => ( {(['xs', 'sm', 'md', 'lg'] as const).map((size) => ( ))} ), }; export const Palettes: Story = { render: () => ( {(['primary', 'secondary', 'tertiary', 'black', 'red', 'green'] as const).map((palette) => ( ))} ), }; export const Default: Story = { render: () => ( {[ ['default', 'Default'], ['comfortable', 'Comfortable'], ['compact', 'Compact'], ].map(([value, label]) => (
))}
), }; export const WithDisabledOption: Story = { render: () => (
), }; export const Horizontal: Story = { render: () => (
), };