blob: 929a9e2548d11d5b9ff0db2c1140e15028bfa5d4 [file] [log] [blame]
giod0026612025-05-08 13:00:36 +00001import * as React from "react";
2import * as SeparatorPrimitive from "@radix-ui/react-separator";
gio5f2f1002025-03-20 18:38:48 +04003
giod0026612025-05-08 13:00:36 +00004import { cn } from "@/lib/utils";
gio5f2f1002025-03-20 18:38:48 +04005
6const Separator = React.forwardRef<
giod0026612025-05-08 13:00:36 +00007 React.ElementRef<typeof SeparatorPrimitive.Root>,
8 React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
9>(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (
10 <SeparatorPrimitive.Root
11 ref={ref}
12 decorative={decorative}
13 orientation={orientation}
14 className={cn(
15 "shrink-0 bg-border",
16 orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
17 className,
18 )}
19 {...props}
20 />
21));
22Separator.displayName = SeparatorPrimitive.Root.displayName;
gio5f2f1002025-03-20 18:38:48 +040023
giod0026612025-05-08 13:00:36 +000024export { Separator };