2026-06-01 23:35:00 +08:00
|
|
|
import * as React from 'react'
|
|
|
|
|
import { Separator as SeparatorPrimitive } from 'radix-ui'
|
2026-05-19 16:05:09 +08:00
|
|
|
|
2026-06-01 23:35:00 +08:00
|
|
|
import { cn } from '@/ui/lib/utils'
|
2026-05-19 16:05:09 +08:00
|
|
|
|
|
|
|
|
function Separator({
|
|
|
|
|
className,
|
2026-06-01 23:35:00 +08:00
|
|
|
orientation = 'horizontal',
|
2026-05-19 16:05:09 +08:00
|
|
|
decorative = true,
|
|
|
|
|
...props
|
|
|
|
|
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
|
|
|
return (
|
|
|
|
|
<SeparatorPrimitive.Root
|
|
|
|
|
data-slot="separator"
|
|
|
|
|
decorative={decorative}
|
|
|
|
|
orientation={orientation}
|
|
|
|
|
className={cn(
|
2026-06-01 23:35:00 +08:00
|
|
|
'shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',
|
|
|
|
|
className,
|
2026-05-19 16:05:09 +08:00
|
|
|
)}
|
|
|
|
|
{...props}
|
|
|
|
|
/>
|
2026-05-30 09:29:24 +08:00
|
|
|
)
|
2026-05-19 16:05:09 +08:00
|
|
|
}
|
|
|
|
|
|
2026-05-30 09:29:24 +08:00
|
|
|
export { Separator }
|