import { switchPropDefs } from "@radix-ui/themes/props" import type { Meta, StoryObj } from "@storybook/react" import { Switch } from "./Switch" const meta: Meta = { title: "base/form/Switch", component: Switch, parameters: { layout: "centered", }, tags: ["autodocs"], argTypes: { size: { control: "select", options: switchPropDefs.size.values, }, variant: { control: "select", options: switchPropDefs.variant.values, }, color: { control: "select", options: switchPropDefs.color.values, }, highContrast: { control: "boolean", }, radius: { control: "select", options: switchPropDefs.radius.values, }, disabled: { control: "boolean", }, }, } satisfies Meta export default meta type Story = StoryObj /** * Default switch component. */ export const Default: Story = { render: args => , } /** * Disabled switch component. */ export const Disabled: Story = { render: args => , } /** * Different sizes of switches. */ export const Sizes: Story = { render: args => (
{switchPropDefs.size.values.map(size => (
))}
), } /** * Different variants of switches. */ export const Variants: Story = { render: args => (
{switchPropDefs.variant.values.map(variant => (
))}
), }