input-switch.stories.tsx 860 B

12345678910111213141516171819202122232425262728293031
  1. import OLFormSwitch from '@/features/ui/components/ol/ol-form-switch'
  2. import { bsVersionDecorator } from '../../.storybook/utils/with-bootstrap-switcher'
  3. import { disableControlsOf } from './utils/arg-types'
  4. export const Unchecked = () => {
  5. return <OLFormSwitch onChange={() => {}} checked={false} />
  6. }
  7. export const UncheckedDisabled = () => {
  8. return <OLFormSwitch onChange={() => {}} checked={false} disabled />
  9. }
  10. export const Checked = () => {
  11. return <OLFormSwitch onChange={() => {}} checked />
  12. }
  13. export const CheckedDisabled = () => {
  14. return <OLFormSwitch onChange={() => {}} checked disabled />
  15. }
  16. export default {
  17. title: 'Shared / Components / Input Switch',
  18. component: OLFormSwitch,
  19. argTypes: {
  20. ...bsVersionDecorator.argTypes,
  21. ...disableControlsOf('inputRef', 'bs3Props'),
  22. },
  23. args: {
  24. ...bsVersionDecorator.args,
  25. },
  26. }