import * as React from 'react' import type { StoryFn, Meta } from '@storybook/react-webpack5' import { RadioGroup, Radio } from '.' import { Board } from '@planview/pv-icons' export default { title: 'pv-form/Components/Radio', component: RadioGroup, argTypes: { label: { control: { type: 'radio' }, options: ['string', 'configuration'], mapping: { string: 'My label', configuration: { text: 'Custom label', required: true, requiredTooltip: 'Hello world', iconTooltip: 'Tooltip over icon', icon: , }, }, }, }, args: { id: 'myId', error: '', warning: '', defaultValue: 'two', label: 'My label', }, } satisfies Meta const Template: StoryFn = (args) => ( ) export const Default = Template.bind({}) export const LabelToTheLeft = Template.bind({}) LabelToTheLeft.args = { labelPosition: 'left', } LabelToTheLeft.parameters = { controls: { exclude: ['labelPosition'], }, } export const OrientationHorizontal = Template.bind({}) OrientationHorizontal.args = { orientation: 'horizontal', } OrientationHorizontal.parameters = { controls: { exclude: ['orientation'], }, } export const LabelToTheLeftAndOrientationHorizontal = Template.bind({}) LabelToTheLeftAndOrientationHorizontal.args = { labelPosition: 'left', orientation: 'horizontal', } LabelToTheLeftAndOrientationHorizontal.parameters = { controls: { exclude: ['labelPosition', 'orientation'], }, } export const WithError = Template.bind({}) WithError.args = { error: 'Something is wrong', } WithError.parameters = { controls: { exclude: ['error'], }, } export const WithWarning = Template.bind({}) WithWarning.args = { warning: 'Something needs your attention', } WithWarning.parameters = { controls: { exclude: ['warning'], }, }