/* * (c) Copyright 2026 Palantir Technologies Inc. All rights reserved. */ import type { Meta, StoryObj } from "@storybook/react-vite"; import { StoryLabel } from "@storybook-common"; import { Flex } from "@blueprintjs/labs"; import { Divider } from "./divider"; const meta: Meta = { title: "Core/Divider", component: Divider, decorators: [ Story => (
), ], tags: ["autodocs"], args: { compact: false, }, argTypes: { compact: { control: "boolean", }, tagName: { control: "select", options: ["div", "span", "br", "hr", "p"], // Can be any HTML tag }, }, } satisfies Meta; export default meta; type Story = StoryObj; /** * A basic horizontal divider rendered inside a column flex container. */ export const Default: Story = { name: "Default", render: args => (
Content above Content below
Content above, text center-aligned Content below, text center-aligned
), }; /** * A basic vertical divider inside a flex container */ export const Vertical: Story = { render: args => ( Content to the left that wraps around a bit more than you'd expect Content to the right that also wraps around a bit more than you'd expect Content above, text center-aligned Content below, text center-aligned ), }; /** * Use the `compact` prop to remove the default margin around the Divider, * making it flush with adjacent content. */ export const CompactExample: Story = { name: "Compact", argTypes: { compact: { table: { disable: true } }, }, render: args => ( Above Below Above Below ), }; /** * Interactive playground with all Divider props available via Storybook controls. */ export const Playground: Story = { decorators: [ Story => ( Content above Content below ), ], args: { compact: false, }, };