Files
cunkebao_v3/Cunkebao/components/ui/separator.tsx
笔记本里的永平 dedf6be5a6 feat: 本次提交更新内容如下
更新了旧项目的代码和样式
2025-07-11 11:40:24 +08:00

24 lines
592 B
TypeScript

import * as React from "react"
import { cn } from "@/lib/utils"
export interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
orientation?: "horizontal" | "vertical"
}
const Separator = React.forwardRef<HTMLDivElement, SeparatorProps>(
({ className, orientation = "horizontal", ...props }, ref) => (
<div
ref={ref}
className={cn(
"shrink-0 bg-border",
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
className,
)}
{...props}
/>
),
)
Separator.displayName = "Separator"
export { Separator }