@navinc/base-react-components
Version:
Nav's Pattern Library
29 lines (23 loc) • 578 B
JavaScript
import React from 'react'
import withPropsCombinations from 'react-storybook-addon-props-combinations'
import Toggle from './toggle.js'
import readme from './toggle.readme.md'
export default {
title: 'Form Elements/Toggle',
component: Toggle,
parameters: {
info: { text: readme },
},
}
export const Basic = (args) => <Toggle {...args} />
Basic.args = {
checked: false,
disabled: false,
}
export const Variations = withPropsCombinations(Toggle, {
checked: [false, true],
disabled: [false, true],
})
Variations.parameters = {
info: { disable: true },
}