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