Convert all v5 JS/JSX source files to TS/TSX, add tsconfig.json, install typescript and @types/react* dev deps, add typecheck npm script, create types.ts with shared prop types, and update Tailwind CSS source glob and shadcn components.json to include TS extensions.
24 lines
702 B
TypeScript
24 lines
702 B
TypeScript
'use client';
|
|
|
|
import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
|
|
import type * as React from 'react';
|
|
|
|
import { cn } from '@/lib/utils';
|
|
|
|
type SeparatorProps = React.ComponentProps<typeof SeparatorPrimitive>;
|
|
|
|
function Separator({ className, orientation = 'horizontal', ...props }: SeparatorProps) {
|
|
return (
|
|
<SeparatorPrimitive
|
|
data-slot="separator"
|
|
orientation={orientation}
|
|
className={cn(
|
|
'shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch',
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export { Separator };
|