import React from 'react' import { RadioButtonField } from '../' import { actions, HIDE_CONTROL, Story, STRING } from '../helpers/storybook' export default { title: 'RadioButtonField', component: RadioButtonField, argTypes: { label: STRING, ...actions('onChange', 'onFocus', 'onBlur'), }, args: { name: 'rbf' }, } as const export const BasicUsage: Story = (args) => (
) BasicUsage.args = { label: 'A Label' } type MultiStory = Story export const MultipleRadioButtonFields: MultiStory = ({ buttons, ...args }) => (
{buttons.map((label, i) => ( ))}
) MultipleRadioButtonFields.argTypes = { label: HIDE_CONTROL } MultipleRadioButtonFields.args = { buttons: ['Label 1', 'Label 2', 'Label 3'] } MultipleRadioButtonFields.storyName = 'Multiple RadioButton Fields'