gitscope
← marzneshin / v0.3.0-alpha7 / dashboard/src/components/ui/separator.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/components/ui/separator.tsx · TypeScript
Blame Raw
 1import * as React from "react"
 2import * as SeparatorPrimitive from "@radix-ui/react-separator"
 3
 4import { cn } from "@marzneshin/utils"
 5
 6const Separator = React.forwardRef<
 7  React.ElementRef<typeof SeparatorPrimitive.Root>,
 8  React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
 9>(
10  (
11    { className, orientation = "horizontal", decorative = true, ...props },
12    ref
13  ) => (
14    <SeparatorPrimitive.Root
15      ref={ref}
16      decorative={decorative}
17      orientation={orientation}
18      className={cn(
19        "shrink-0 bg-border",
20        orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
21        className
22      )}
23      {...props}
24    />
25  )
26)
27Separator.displayName = SeparatorPrimitive.Root.displayName
28
29export { Separator }