| gio | d002661 | 2025-05-08 13:00:36 +0000 | [diff] [blame] | 1 | import * as React from "react"; |
| 2 | import * as SeparatorPrimitive from "@radix-ui/react-separator"; |
| gio | 5f2f100 | 2025-03-20 18:38:48 +0400 | [diff] [blame] | 3 | |
| gio | d002661 | 2025-05-08 13:00:36 +0000 | [diff] [blame] | 4 | import { cn } from "@/lib/utils"; |
| gio | 5f2f100 | 2025-03-20 18:38:48 +0400 | [diff] [blame] | 5 | |
| 6 | const Separator = React.forwardRef< |
| gio | d002661 | 2025-05-08 13:00:36 +0000 | [diff] [blame] | 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( |
| 15 | "shrink-0 bg-border", |
| 16 | orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", |
| 17 | className, |
| 18 | )} |
| 19 | {...props} |
| 20 | /> |
| 21 | )); |
| 22 | Separator.displayName = SeparatorPrimitive.Root.displayName; |
| gio | 5f2f100 | 2025-03-20 18:38:48 +0400 | [diff] [blame] | 23 | |
| gio | d002661 | 2025-05-08 13:00:36 +0000 | [diff] [blame] | 24 | export { Separator }; |