diff --git a/packages/propel/src/separator/separator.stories.tsx b/packages/propel/src/separator/separator.stories.tsx new file mode 100644 index 00000000000..61beae48d29 --- /dev/null +++ b/packages/propel/src/separator/separator.stories.tsx @@ -0,0 +1,50 @@ +import type { Meta, StoryObj } from "@storybook/react-vite"; +import { Separator } from "./separator"; + +const meta: Meta = { + title: "Components/Separator", + component: Separator, + parameters: { + layout: "centered", + }, + tags: ["autodocs"], +}; + +export default meta; +type Story = StoryObj; + +export const Default: Story = { + render: () => ( +
+
Content Above
+ +
Content Below
+
+ ), +}; + +export const Vertical: Story = { + render: () => ( +
+
Left Content
+ +
Right Content
+
+ ), +}; + +export const WithinContainer: Story = { + render: () => ( +
+
+

Section 1

+

Description for section 1

+
+ +
+

Section 2

+

Description for section 2

+
+
+ ), +}; diff --git a/packages/propel/src/separator/separator.tsx b/packages/propel/src/separator/separator.tsx new file mode 100644 index 00000000000..5e02309dcd8 --- /dev/null +++ b/packages/propel/src/separator/separator.tsx @@ -0,0 +1,29 @@ +import * as React from "react"; +import { Separator as SeparatorPrimitive } from "@base-ui-components/react/separator"; +import { cn } from "../utils"; + +interface SeparatorProps extends React.ComponentProps { + /** + * The orientation of the separator + * @default "horizontal" + */ + orientation?: "horizontal" | "vertical"; +} + +const Separator = React.forwardRef, SeparatorProps>( + ({ orientation = "horizontal", ...props }, ref) => ( + + ) +); + +Separator.displayName = "Separator"; + +export { Separator }; +export type { SeparatorProps };