- 重构 Button、Card、Badge、Input、Textarea 等基础组件 - 新增 Accordion、Alert、Dialog、Dropdown、Form 等 shadcn/ui 组件 - 新增 AnimatedCounter、StatsShowcase、MetricCard 等数据展示组件 - 新增 ScrollReveal 滚动动画组件 - 重构 Toast 通知系统与 Tooltip 提示组件 - 更新设计令牌系统,对齐新品牌视觉
31 lines
845 B
TypeScript
31 lines
845 B
TypeScript
'use client';
|
|
|
|
import * as React from 'react';
|
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
import { cn } from '@/lib/utils';
|
|
|
|
/**
|
|
* 标准 shadcn/ui Separator 组件
|
|
* 基于 @radix-ui/react-separator
|
|
*/
|
|
const Separator = React.forwardRef<
|
|
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
|
React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
|
|
>(({ className, orientation = 'horizontal', decorative = true, ...props }, ref) => (
|
|
<SeparatorPrimitive.Root
|
|
ref={ref}
|
|
data-slot="separator"
|
|
decorative={decorative}
|
|
orientation={orientation}
|
|
className={cn(
|
|
'shrink-0 bg-border-primary',
|
|
orientation === 'horizontal' ? 'h-px w-full' : 'h-full w-px',
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
));
|
|
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
|
|
export { Separator };
|