import { checkboxPropDefs } from "@radix-ui/themes/props" import type { Meta, StoryObj } from "@storybook/react" import { Checkbox } from "./Checkbox" /** * The Checkbox component allows users to select one or more options from a set. */ const meta: Meta = { title: "base/form/Checkbox", component: Checkbox, parameters: { layout: "centered", }, tags: ["autodocs"], argTypes: { size: { control: "select", options: checkboxPropDefs.size.values, }, color: { control: "select", options: checkboxPropDefs.color.values, }, highContrast: { control: "boolean", }, disabled: { control: "boolean", }, }, } satisfies Meta export default meta type Story = StoryObj /** * Checkboxes can have different states. */ export const States: Story = { render: args => (
), } /** * Checkboxes can be disabled. */ export const Disabled: Story = { render: args => (
), } /** * Different sizes of checkboxes. */ export const Sizes: Story = { render: args => (
), } /** * Checkboxes can have different colors. */ export const Colors: Story = { render: args => (
{checkboxPropDefs.color.values.map(color => (
))}
), } /** * Checkbox group with multiple options and labels. */ export const WithLabels: Story = { render: args => (
Select your interests:
), }