-
Notifications
You must be signed in to change notification settings - Fork 12
/
RadioGroup.stories.tsx
25 lines (21 loc) · 852 Bytes
/
RadioGroup.stories.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { action } from '@storybook/addon-actions'
import { Meta, StoryObj } from '@storybook/react'
import React from 'react'
import RadioButton from '../src/components/RadioButton'
import RadioGroup from '../src/components/RadioGroup'
const meta: Meta = {
title: 'Components/RadioGroup',
component: RadioGroup,
} satisfies Meta<typeof RadioGroup>
export default meta
type Story = StoryObj<typeof meta>
export const Default: Story = {
render: () => (
<RadioGroup onChange={action('radio option changed')} name="radioGroupName">
<RadioButton name="name1" label="OONI" value="one" id="one" />
<RadioButton name="name2" label="Ooni" value="two" id="two" />
<RadioButton name="name3" label="ooni" value="three" id="three" />
<RadioButton name="name4" label="O.O.N.I" value="four" id="four" />
</RadioGroup>
),
}