| 1 | import * as React from "react"; |
| 2 | import * as SeparatorPrimitive from "@radix-ui/react-separator"; |
| 3 | |
| 4 | import { cn } from "@/lib/utils"; |
| 5 | |
| 6 | const Separator = React.forwardRef< |
| 7 | 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("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className)} |
| 15 | {...props} |
| 16 | /> |
| 17 | )); |
| 18 | Separator.displayName = SeparatorPrimitive.Root.displayName; |
| 19 | |
| 20 | export { Separator }; |