UNPKG

@wonderflow/react-components

Version:

UI components from Wonderflow's Wanda design system

45 lines (44 loc) 1.24 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { Card } from '../..'; import { Radio } from './radio'; const story = { title: 'Inputs/Radio', component: Radio, argTypes: { onChange: { action: 'changed', table: { disable: true, }, }, disabled: { options: [true, false], control: { type: 'inline-radio' }, }, }, }; export default story; const Template = args => (_jsx(Radio, { ...args })); export const Default = Template.bind({}); export const Checked = Template.bind({}); Checked.args = { defaultChecked: true, }; export const DisabledChecked = Template.bind({}); DisabledChecked.args = { defaultChecked: true, disabled: true, }; export const withLabel = Template.bind({}); withLabel.args = { defaultChecked: true, disabled: false, label: 'Label', }; const ConstraintTemplate = args => (_jsx(Card, { dimmed: 0, bordered: true, style: { width: '300px' }, children: _jsx(Radio, { ...args }) })); export const withConstraint = ConstraintTemplate.bind({}); withConstraint.args = { defaultChecked: true, disabled: false, label: 'myVeryLongUsernameUnspacedLabel@wonderflow.ai', };