blob: 6d7f12265ba0338704f013930ce4d52c56527dd1 [file] [log] [blame]
gio5f2f1002025-03-20 18:38:48 +04001import * as React from "react"
2import * as SeparatorPrimitive from "@radix-ui/react-separator"
3
4import { cn } from "@/lib/utils"
5
6const Separator = React.forwardRef<
7 React.ElementRef<typeof SeparatorPrimitive.Root>,
8 React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
9>(
10 (
11 { className, orientation = "horizontal", decorative = true, ...props },
12 ref
13 ) => (
14 <SeparatorPrimitive.Root
15 ref={ref}
16 decorative={decorative}
17 orientation={orientation}
18 className={cn(
19 "shrink-0 bg-border",
20 orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
21 className
22 )}
23 {...props}
24 />
25 )
26)
27Separator.displayName = SeparatorPrimitive.Root.displayName
28
29export { Separator }