π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
[WEB-4740] feat: add propel seperator (#7637)
Jayash Tripathy64b95daff4ad
diff --git a/packages/propel/src/separator/separator.stories.tsx b/packages/propel/src/separator/separator.stories.tsxnew file mode 100644index 0000000000..61beae48d2--- /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<typeof Separator> = {+ title: "Components/Separator",+ component: Separator,+ parameters: {+ layout: "centered",+ },+ tags: ["autodocs"],+};++export default meta;+type Story = StoryObj<typeof Separator>;++export const Default: Story = {+ render: () => (+ <div className="w-[300px] space-y-4">+ <div>Content Above</div>+ <Separator />+ <div>Content Below</div>+ </div>+ ),+};++export const Vertical: Story = {+ render: () => (+ <div className="flex h-[100px] items-center space-x-4">+ <div>Left Content</div>+ <Separator orientation="vertical" />+ <div>Right Content</div>+ </div>+ ),+};++export const WithinContainer: Story = {+ render: () => (+ <div className="w-[300px] rounded-lg border p-6 space-y-4">+ <div className="space-y-2">+ <h4 className="font-medium leading-none">Section 1</h4>+ <p className="text-sm text-muted-foreground">Description for section 1</p>+ </div>+ <Separator />+ <div className="space-y-2">+ <h4 className="font-medium leading-none">Section 2</h4>+ <p className="text-sm text-muted-foreground">Description for section 2</p>+ </div>+ </div>+ ),+};diff --git a/packages/propel/src/separator/separator.tsx b/packages/propel/src/separator/separator.tsxnew file mode 100644index 0000000000..5e02309dcd--- /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<typeof SeparatorPrimitive> {+ /**+ * The orientation of the separator+ * @default "horizontal"+ */+ orientation?: "horizontal" | "vertical";+}++const Separator = React.forwardRef<React.ElementRef<typeof SeparatorPrimitive>, SeparatorProps>(+ ({ orientation = "horizontal", ...props }, ref) => (+ <SeparatorPrimitive+ ref={ref}+ orientation={orientation}+ data-slot="separator"+ data-orientation={orientation}+ {...props}+ className={cn("bg-custom-border-200", "shrink-0", orientation === "horizontal" ? "h-px w-full" : "h-full w-px")}+ />+ )+);++Separator.displayName = "Separator";++export { Separator };+export type { SeparatorProps };