systeme.io-task
31 строка · 787.0 Байт
1"use client";
2
3import * as React from "react";
4import * as SeparatorPrimitive from "@radix-ui/react-separator";
5
6import { cn } from "~/shared/lib/utils";
7
8const Separator = React.forwardRef<
9React.ElementRef<typeof SeparatorPrimitive.Root>,
10React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
11>(
12(
13{ className, orientation = "horizontal", decorative = true, ...props },
14ref,
15) => (
16<SeparatorPrimitive.Root
17ref={ref}
18decorative={decorative}
19orientation={orientation}
20className={cn(
21"shrink-0 bg-border",
22orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
23className,
24)}
25{...props}
26/>
27),
28);
29Separator.displayName = SeparatorPrimitive.Root.displayName;
30
31export { Separator };
32