refactor(button & combobox): improve styling and class management

- Adjusted button outline variant for consistency in dark mode styling.
- Removed unnecessary background color from combobox trigger for cleaner appearance.
- Updated comments in the theme CSS file for clarity and consistency.
This commit is contained in:
MyPrototypeWhat 2025-11-07 11:04:06 +08:00
parent f7c8fb8d56
commit b57ed07d00
3 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ const buttonVariants = cva(
destructive: destructive:
'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60', 'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
outline: outline:
'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50', 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input dark:border-input dark:hover:bg-input/50',
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80', secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50', ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
link: 'text-primary underline-offset-4 hover:underline' link: 'text-primary underline-offset-4 hover:underline'

View File

@ -254,7 +254,7 @@ export function Combobox({
size={size} size={size}
disabled={disabled} disabled={disabled}
style={{ width: triggerWidth }} style={{ width: triggerWidth }}
className={cn(comboboxTriggerVariants({ state, size }), 'bg-white', className)} className={cn(comboboxTriggerVariants({ state, size }), className)}
aria-expanded={open} aria-expanded={open}
aria-invalid={error}> aria-invalid={error}>
{renderTriggerContent()} {renderTriggerContent()}

View File

@ -420,7 +420,7 @@
/* Dark Mode 覆盖 */ /* Dark Mode 覆盖 */
/* ==================== */ /* ==================== */
@theme dark { /* @theme dark {
--color-background: var(--cs-background); --color-background: var(--cs-background);
--color-foreground: var(--cs-foreground); --color-foreground: var(--cs-foreground);
--color-card: var(--cs-card); --color-card: var(--cs-card);
@ -432,7 +432,7 @@
--color-accent: var(--cs-accent); --color-accent: var(--cs-accent);
--color-sidebar: var(--cs-sidebar); --color-sidebar: var(--cs-sidebar);
--color-sidebar-accent: var(--cs-sidebar-accent); --color-sidebar-accent: var(--cs-sidebar-accent);
} } */
/* ==================== */ /* ==================== */
/* Base Styles可选 */ /* Base Styles可选 */