chatbot-template/components/ui/separator.tsx

32 lines
780 B
TypeScript
Raw Normal View History

2024-11-14 12:16:05 -05:00
'use client';
2024-11-14 12:16:05 -05:00
import * as React from 'react';
import * as SeparatorPrimitive from '@radix-ui/react-separator';
2024-11-14 12:16:05 -05:00
import { cn } from '@/lib/utils';
const Separator = React.forwardRef<
React.ElementRef<typeof SeparatorPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
>(
(
2024-11-14 12:16:05 -05:00
{ className, orientation = 'horizontal', decorative = true, ...props },
2024-11-15 13:00:15 -05:00
ref,
) => (
<SeparatorPrimitive.Root
ref={ref}
decorative={decorative}
orientation={orientation}
className={cn(
2024-11-14 12:16:05 -05:00
'shrink-0 bg-border',
orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
2024-11-15 13:00:15 -05:00
className,
)}
{...props}
/>
2024-11-15 13:00:15 -05:00
),
2024-11-14 12:16:05 -05:00
);
Separator.displayName = SeparatorPrimitive.Root.displayName;
2024-11-14 12:16:05 -05:00
export { Separator };