封装 Header 和 Navbar 组件,调整用户界面

This commit is contained in:
2025-04-25 16:24:04 +08:00
parent 8b742bdc34
commit 5c88cd7f32
14 changed files with 244 additions and 94 deletions

View File

@@ -33,7 +33,7 @@ const buttonVariants = cva(
)
type ButtonProps = React.ComponentProps<'button'> & {
theme?: 'default' | 'outline' | 'gradient' | 'error' | 'accent'
theme?: 'default' | 'outline' | 'gradient' | 'error' | 'accent' | 'ghost'
}
function Button(rawProps: ButtonProps) {
@@ -55,6 +55,7 @@ function Button(rawProps: ButtonProps) {
accent: 'bg-accent text-accent-foreground hover:bg-accent/90',
error: 'bg-fail text-white hover:bg-fail/90',
outline: 'border bg-background hover:bg-secondary hover:text-secondary-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
ghost: "text-foreground hover:bg-muted",
}[theme ?? 'default'],
className,
)}