import type { Meta, StoryObj } from 'storybook-solidjs-vite'; import { Separator } from './separator'; import { componentDescription } from '../stories/docs/element-controls'; const meta = { title: 'Solid (Advanced)/Primitives/Separator', component: Separator, tags: ['autodocs'], parameters: { layout: 'padded', docs: { controls: { exclude: ['use:eventListener'] }, description: componentDescription([ 'A thin **divider** line (a `role="separator"` element) that visually splits content either horizontally or vertically.', '**When to use:** to separate stacked sections, group items in a menu/list, or divide inline controls in a toolbar.', '**How to use:** set `orientation` to `horizontal` (full-width line) or `vertical` (full-height line). For a vertical separator, give the parent a height so the line has something to fill.', '**Placement:** between message groups, in dropdown/menu sections, header toolbars, and between sidebar regions.', ]), }, }, argTypes: { orientation: { control: 'select', options: ['horizontal', 'vertical'], description: 'Direction of the divider line.', table: { defaultValue: { summary: 'horizontal' } }, }, }, args: { orientation: 'horizontal', }, render: (args) => (
Above
Below
Above
Below