separator.tsx 551 B

12345678910111213141516171819202122232425
  1. 'use client';
  2. import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
  3. import { cn } from '@/lib/utils';
  4. function Separator({
  5. className,
  6. orientation = 'horizontal',
  7. ...props
  8. }: SeparatorPrimitive.Props) {
  9. return (
  10. <SeparatorPrimitive
  11. data-slot="separator"
  12. orientation={orientation}
  13. className={cn(
  14. 'shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch',
  15. className,
  16. )}
  17. {...props}
  18. />
  19. );
  20. }
  21. export { Separator };