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