separator.tsx 649 B

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