29 lines
568 B
TypeScript
29 lines
568 B
TypeScript
import * as React from 'react'
|
|
|
|
import { cn } from '@/lib/utils'
|
|
|
|
function Separator({
|
|
className,
|
|
orientation = 'horizontal',
|
|
decorative = true,
|
|
...props
|
|
}: React.HTMLAttributes<HTMLDivElement> & {
|
|
orientation?: 'horizontal' | 'vertical'
|
|
decorative?: boolean
|
|
}) {
|
|
return (
|
|
<div
|
|
aria-hidden={decorative}
|
|
data-orientation={orientation}
|
|
className={cn(
|
|
'shrink-0 bg-border/80',
|
|
orientation === 'horizontal' ? 'h-px w-full' : 'h-full w-px',
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export { Separator }
|