大改变

This commit is contained in:
YoRHa
2026-02-03 19:56:21 +08:00
parent 4b13d255bc
commit 9aa9e44295
545 changed files with 8712 additions and 16168 deletions

33
lib/buttonStyles.ts Normal file
View File

@@ -0,0 +1,33 @@
/**
* Centralized button style configurations using tailwind-variants
* Maintains consistent button styling across the app with automatic class merging
*/
import { tv, type VariantProps } from "tailwind-variants";
export const buttonStyles = tv({
base: "group transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed",
variants: {
intent: {
// Theme button - 页面主题色按钮 (bg-foreground text-background)
theme: "rounded-xl h-11 w-full px-6 text-body-small font-bold bg-foreground text-background",
// Max button - 绿色 Max 按钮
max: "rounded-full px-3 h-[24px] min-w-0 text-[12px] font-bold bg-[#a7f3d0] text-[#065f46] dark:bg-green-900/30 dark:text-green-300",
},
fullWidth: {
true: "w-full",
},
},
defaultVariants: {
intent: "theme",
},
});
// Type export for use in components
export type ButtonIntent = VariantProps<typeof buttonStyles>["intent"];
/**
* Disabled button state classes
* Apply these when button is disabled
*/
export const disabledButtonClasses = "cursor-not-allowed opacity-50";