|
20 | 20 | "variant": { |
21 | 21 | "primary": "bg-primary-9 text-white hover:bg-primary-10", |
22 | 22 | "destructive": "bg-destructive-9 hover:bg-destructive-10 text-white", |
23 | | - "outline": "border border-secondary-5/80 hover:bg-border-secondary-6/80 bg-secondary-1 hover:bg-secondary-3 text-secondary-12", |
| 23 | + "outline": "border border-secondary-a4 bg-secondary-1 hover:bg-secondary-3 text-secondary-12", |
24 | 24 | "secondary": "bg-secondary-4 text-secondary-12 hover:bg-secondary-5", |
25 | 25 | "ghost": "hover:bg-secondary-3 text-secondary-12", |
26 | 26 | "link": "text-secondary-12 underline-offset-4 hover:underline", |
27 | 27 | "dark": "bg-secondary-12 text-secondary-1 hover:bg-secondary-12/80", |
28 | 28 | }, |
29 | 29 | "size": { |
30 | | - "xs": "px-1.5 h-7 rounded-sm gap-1.5", |
31 | | - "sm": "px-2 h-8 rounded-lg gap-2", |
32 | | - "md": "px-2.5 h-9 rounded-lg gap-2", |
33 | | - "lg": "px-3 h-10 rounded-xl gap-2.5", |
34 | | - "xl": "px-3.5 h-12 rounded-2xl gap-3", |
35 | | - "icon-xs": "size-7 rounded-md", |
36 | | - "icon-sm": "size-8 rounded-md", |
37 | | - "icon-md": "size-9 rounded-lg", |
38 | | - "icon-lg": "size-10 rounded-xl", |
39 | | - "icon-xl": "size-12 rounded-2xl", |
| 30 | + "xs": "px-1.5 h-7 rounded-xs gap-1.5", |
| 31 | + "sm": "px-2 h-8 rounded-sm gap-2", |
| 32 | + "md": "px-2.5 h-9 rounded-md gap-2", |
| 33 | + "lg": "px-3 h-10 rounded-lg gap-2.5", |
| 34 | + "xl": "px-3.5 h-12 rounded-xl gap-3", |
| 35 | + "icon-xs": "size-7 rounded-xs", |
| 36 | + "icon-sm": "size-8 rounded-sm", |
| 37 | + "icon-md": "size-9 rounded-md", |
| 38 | + "icon-lg": "size-10 rounded-lg", |
| 39 | + "icon-xl": "size-12 rounded-xl", |
40 | 40 | }, |
41 | 41 | } |
42 | 42 |
|
43 | 43 |
|
44 | 44 | class Button(BaseButton, CoreComponent): |
45 | 45 | """A custom button component.""" |
46 | 46 |
|
47 | | - # Button variant |
| 47 | + # Button variant. Defaults to "primary". |
48 | 48 | variant: Var[LiteralButtonVariant] |
49 | 49 |
|
50 | | - # Button size |
| 50 | + # Button size. Defaults to "md". |
51 | 51 | size: Var[LiteralButtonSize] |
52 | 52 |
|
53 | 53 | # The loading state of the button |
|
0 commit comments