diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-06-22 10:02:50 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-06-22 10:02:50 +0200 |
| commit | 87a83a5604b20550430ef4eefbcd573d309694e2 (patch) | |
| tree | 7ed86f00b8414cb6543f5c5ac98ea6e9abd2e10f /apps/web/src/components/ui/separator.tsx | |
| download | opencut-87a83a5604b20550430ef4eefbcd573d309694e2.tar.gz | |
Initial commit
Diffstat (limited to 'apps/web/src/components/ui/separator.tsx')
| -rw-r--r-- | apps/web/src/components/ui/separator.tsx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/apps/web/src/components/ui/separator.tsx b/apps/web/src/components/ui/separator.tsx new file mode 100644 index 00000000..8e6ad205 --- /dev/null +++ b/apps/web/src/components/ui/separator.tsx @@ -0,0 +1,31 @@ +"use client"; + +import * as React from "react"; +import * as SeparatorPrimitive from "@radix-ui/react-separator"; + +import { cn } from "../../lib/utils"; + +const Separator = React.forwardRef< + React.ElementRef<typeof SeparatorPrimitive.Root>, + React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> +>( + ( + { className, orientation = "horizontal", decorative = true, ...props }, + ref + ) => ( + <SeparatorPrimitive.Root + ref={ref} + decorative={decorative} + orientation={orientation} + className={cn( + "shrink-0 bg-border", + orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", + className + )} + {...props} + /> + ) +); +Separator.displayName = SeparatorPrimitive.Root.displayName; + +export { Separator }; |
