封装 Header 和 Navbar 组件,调整用户界面
This commit is contained in:
@@ -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,
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user