import type { Meta, StoryObj } from '@storybook/nextjs'
import { useId, useState } from 'react'
import { SwitchRoot, SwitchThumb } from './Switch'
const SwitchExample = () => {
const [checked, setChecked] = useState(false)
const switchId = useId()
return (
{checked ? 'ON' : 'OFF'}
)
}
const meta = {
component: SwitchRoot,
parameters: {
docs: {
description: {
component:
'A Radix UI Switch wrapper. Use SwitchRoot and SwitchThumb together to create a toggle switch.',
},
},
},
} satisfies Meta
export default meta
type Story = StoryObj
export const Default: Story = {
render: () => ,
}