separator.tsx raw
1 import * as React from "react";
2 import { Separator as SeparatorPrimitive } from "radix-ui";
3
4 import { cn } from "src/lib/utils";
5
6 function Separator({
7 className,
8 orientation = "horizontal",
9 decorative = true,
10 ...props
11 }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
12 return (
13 <SeparatorPrimitive.Root
14 data-slot="separator"
15 decorative={decorative}
16 orientation={orientation}
17 className={cn(
18 "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
19 className
20 )}
21 {...props}
22 />
23 );
24 }
25
26 export { Separator };
27