UNPKG

@wonderflow/react-components

Version:

UI components from Wonderflow's Wanda design system

49 lines (48 loc) 1.36 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { Card } from '../..'; import { Checkbox } from './checkbox'; const story = { title: 'Inputs/Checkbox', component: Checkbox, argTypes: { onChange: { action: 'changed', table: { disable: true, }, }, disabled: { options: [true, false], control: { type: 'inline-radio' }, }, }, }; export default story; const Template = args => (_jsx(Checkbox, { ...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 Indeterminate = Template.bind({}); Indeterminate.args = { indeterminate: 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(Checkbox, { ...args }) })); export const withConstraint = ConstraintTemplate.bind({}); withConstraint.args = { defaultChecked: true, disabled: false, label: 'myVeryLongUsernameUnspacedLabel@wonderflow.ai', };