Files
nextjs-shopify-collection/components/ui/separator.tsx
2026-04-19 11:15:55 -04:00

35 lines
731 B
TypeScript

"use client"
import * as React from "react"
import { cn } from "@/lib/utils"
interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
orientation?: "horizontal" | "vertical"
decorative?: boolean
}
function Separator({
className,
orientation = "horizontal",
decorative = true,
...props
}: SeparatorProps) {
return (
<div
data-slot="separator"
role={decorative ? "none" : "separator"}
aria-orientation={decorative ? undefined : orientation}
data-orientation={orientation}
className={cn(
"bg-border shrink-0",
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
className
)}
{...props}
/>
)
}
export { Separator }