mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 04:41:32 +02:00
* Rename ui to shared * Delete unused Switch component * Update stories with Figma links * Update Tag story naming for clarity * Update Toggle button story naming for clarity * Move shared components to the shared folder * Remove file as part of TS migration * Migrate jsx to tsx * Remove file as part of TS migration * Migrate jsx to tsx * Include necessary controls only * Auto SF GitOrigin-RevId: d2458eeffa7a6b67ce522c3ccb6b4f71e5e76d62
38 lines
1.0 KiB
TypeScript
38 lines
1.0 KiB
TypeScript
import OLFormSwitch from '@/shared/components/ol/ol-form-switch'
|
|
import { figmaDesignUrl } from '../../../.storybook/utils/figma-design-url'
|
|
|
|
type Args = React.ComponentProps<typeof OLFormSwitch>
|
|
|
|
export const Unchecked = (args: Args) => {
|
|
return <OLFormSwitch onChange={() => {}} checked={false} {...args} />
|
|
}
|
|
|
|
export const UncheckedDisabled = (args: Args) => {
|
|
return <OLFormSwitch onChange={() => {}} checked={false} disabled {...args} />
|
|
}
|
|
|
|
export const Checked = (args: Args) => {
|
|
return <OLFormSwitch onChange={() => {}} checked {...args} />
|
|
}
|
|
|
|
export const CheckedDisabled = (args: Args) => {
|
|
return <OLFormSwitch onChange={() => {}} checked disabled {...args} />
|
|
}
|
|
|
|
export default {
|
|
title: 'Shared / Components / Input Switch',
|
|
component: OLFormSwitch,
|
|
args: {
|
|
checked: false,
|
|
disabled: false,
|
|
},
|
|
parameters: {
|
|
controls: {
|
|
include: ['checked', 'disabled'],
|
|
},
|
|
...figmaDesignUrl(
|
|
'https://www.figma.com/design/V7Ogph1Ocs4ux2A4WMNAh7/Overleaf---Components?node-id=3489-139487&m=dev'
|
|
),
|
|
},
|
|
}
|