switcher.stories.tsx 829 B

12345678910111213141516171819202122232425262728
  1. import { Switcher, SwitcherItem } from '../js/shared/components/switcher'
  2. export const Base = () => {
  3. return (
  4. <Switcher name="figure-width" defaultValue="0.5">
  5. <SwitcherItem value="0.25" label="¼ width" />
  6. <SwitcherItem value="0.5" label="½ width" />
  7. <SwitcherItem value="0.75" label="¾ width" />
  8. <SwitcherItem value="1.0" label="Full width" />
  9. </Switcher>
  10. )
  11. }
  12. export const Disabled = () => {
  13. return (
  14. <Switcher name="figure-width" defaultValue="0.5" disabled>
  15. <SwitcherItem value="0.25" label="¼ width" />
  16. <SwitcherItem value="0.5" label="½ width" />
  17. <SwitcherItem value="0.75" label="¾ width" />
  18. <SwitcherItem value="1.0" label="Full width" />
  19. </Switcher>
  20. )
  21. }
  22. export default {
  23. title: 'Shared / Components / Switcher',
  24. component: Switcher,
  25. }