diff --git a/packages/frappe-ui-react/src/components/divider/divider.stories.tsx b/packages/frappe-ui-react/src/components/divider/divider.stories.tsx new file mode 100644 index 00000000..aaa026e5 --- /dev/null +++ b/packages/frappe-ui-react/src/components/divider/divider.stories.tsx @@ -0,0 +1,178 @@ +import type { Meta, StoryObj } from "@storybook/react-vite"; +import { ChevronDown } from "lucide-react"; + +import Divider from "./divider"; +import { Button } from "../button"; +import { Badge } from "../badge"; + +const meta: Meta = { + title: "Components/Divider", + component: Divider, + parameters: { docs: { source: { type: "dynamic" } }, layout: "centered" }, + tags: ["autodocs"], + argTypes: { + orientation: { + control: { type: "select" }, + options: ["horizontal", "vertical"], + description: "Orientation of the divider", + }, + slot: { + control: false, + description: "Element to render in the divider slot", + }, + position: { + control: { type: "select" }, + options: ["start", "center", "end"], + description: "Position of the slot element", + }, + padding: { + control: "number", + description: "Padding around the divider in pixels", + }, + flexItem: { + control: "boolean", + description: "If true, adapts to flex container", + }, + className: { + control: "text", + description: "Additional CSS classes to apply to the divider", + }, + }, +}; + +export default meta; +type Story = StoryObj; + +export const Horizontal: Story = { + render: (args) => ( +
+

Content above

+ +

Content below

+
+ ), + args: { + orientation: "horizontal", + padding: 16, + }, +}; + +export const Vertical: Story = { + render: (args) => ( +
+ Left + + Right +
+ ), + args: { + orientation: "vertical", + flexItem: true, + padding: 16, + }, +}; + +export const WithSlot: Story = { + render: (args) => ( +
+

Content above

+ +

Content below

+
+ ), + args: { + orientation: "horizontal", + position: "center", + padding: 6, + slot: () =>