OpChan/app/src/components/ui/separator.tsx

30 lines
761 B
TypeScript
Raw Normal View History

2025-08-30 18:34:50 +05:30
import * as React from 'react';
import * as SeparatorPrimitive from '@radix-ui/react-separator';
2025-04-15 16:28:03 +05:30
2025-09-22 15:03:46 +05:30
import { cn } from '../../utils'
2025-04-15 16:28:03 +05:30
const Separator = React.forwardRef<
React.ElementRef<typeof SeparatorPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
>(
(
2025-08-30 18:34:50 +05:30
{ className, orientation = 'horizontal', decorative = true, ...props },
2025-04-15 16:28:03 +05:30
ref
) => (
<SeparatorPrimitive.Root
ref={ref}
decorative={decorative}
orientation={orientation}
className={cn(
2025-08-30 18:34:50 +05:30
'shrink-0 bg-border',
orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
2025-04-15 16:28:03 +05:30
className
)}
{...props}
/>
)
2025-08-30 18:34:50 +05:30
);
Separator.displayName = SeparatorPrimitive.Root.displayName;
2025-04-15 16:28:03 +05:30
2025-08-30 18:34:50 +05:30
export { Separator };