import { separatorPropDefs } from "@radix-ui/themes/props" import type { Meta, StoryObj } from "@storybook/react" import { Separator } from "./Separator" /** * The Separator component is used to visually separate content sections. * It provides a horizontal or vertical line that can be customized with different orientations and styling. */ const meta = { title: "base/containment/Separator", component: Separator, parameters: { layout: "centered", }, tags: ["autodocs"], argTypes: { orientation: { control: { type: "select" }, options: separatorPropDefs.orientation.values, }, size: { control: { type: "select" }, options: separatorPropDefs.size.values, }, color: { control: { type: "select" }, options: separatorPropDefs.color.values, }, }, } satisfies Meta export default meta type Story = StoryObj /** * Default horizontal separator. */ export const Default: Story = { render: args => (
Content above
Content below
), } /** * Vertical separator for side-by-side content. */ export const Vertical: Story = { args: { orientation: "vertical", }, render: args => (
Left content
Right content
), } /** * Different sizes of separators. */ export const Sizes: Story = { render: args => (
{separatorPropDefs.size.values.map(size => (
{`Size ${size}`}
Content
))}
), } /** * Separators with different colors. */ export const Colors: Story = { render: args => (
{separatorPropDefs.color.values.map(color => (
{color}
))}
), }