import { action } from 'storybook/actions'; import { Meta, StoryObj } from '@storybook/react-webpack5'; import React, { useState } from 'react'; import { Radio, Props } from '../../src/lib/components/radio/Radio.component'; import { Stack } from '../../src/lib/spacing'; type RadioStory = StoryObj; const meta: Meta = { title: 'Components/Inputs/Radio', component: Radio, args: { name: 'playground', value: 'option', label: 'Option', onChange: action('Radio changed'), }, }; export default meta; export const Playground: RadioStory = {}; export const RadioGroup: RadioStory = { render: () => { const [selected, setSelected] = useState('governance'); return ( setSelected('governance')} /> setSelected('compliance')} /> setSelected('none')} /> ); }, }; export const AllStates: RadioStory = { render: () => (
{}} /> {}} /> {}} /> {}} />
), }; export const DisabledGroup: RadioStory = { render: () => ( {}} /> {}} /> ), };