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