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