overleaf/services/web/frontend/stories/switcher.stories.tsx
Mathias Jakobsen f4408c3fa6 Merge pull request #13103 from overleaf/mj-figure-modal-to-components
[web] Add figure modal components to storybook

GitOrigin-RevId: 9916de620785e3a7dd982f6494f7b471f69c58f7
2023-05-17 08:06:24 +00:00

28 lines
829 B
TypeScript

import { Switcher, SwitcherItem } from '../js/shared/components/switcher'
export const Base = () => {
return (
<Switcher name="figure-width" defaultValue="0.5">
<SwitcherItem value="0.25" label="¼ width" />
<SwitcherItem value="0.5" label="½ width" />
<SwitcherItem value="0.75" label="¾ width" />
<SwitcherItem value="1.0" label="Full width" />
</Switcher>
)
}
export const Disabled = () => {
return (
<Switcher name="figure-width" defaultValue="0.5" disabled>
<SwitcherItem value="0.25" label="¼ width" />
<SwitcherItem value="0.5" label="½ width" />
<SwitcherItem value="0.75" label="¾ width" />
<SwitcherItem value="1.0" label="Full width" />
</Switcher>
)
}
export default {
title: 'Shared / Components / Switcher',
component: Switcher,
}