Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

Commit 548e5af

Browse files
authored
update buttons defaults styles (#71)
* update buttons defaults styles * pyi
1 parent 99aeeaa commit 548e5af

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

reflex_ui/components/base/button.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212

1313
LiteralButtonVariant = Literal[
1414
"primary",
15+
"primary-old",
1516
"primary-bordered",
1617
"destructive",
1718
"outline",
1819
"outline-shadow",
20+
"outline-old",
1921
"secondary",
2022
"ghost",
2123
"ghost-highlight",
@@ -30,10 +32,12 @@
3032

3133
BUTTON_VARIANTS = {
3234
"variant": {
33-
"primary": "bg-primary-9 text-primary-contrast hover:bg-primary-10",
35+
"primary": "bg-primary-9 text-primary-contrast hover:bg-primary-10 shadow-button-bordered disabled:shadow-none",
36+
"primary-old": "bg-primary-9 text-primary-contrast hover:bg-primary-10",
3437
"primary-bordered": "bg-primary-9 text-primary-contrast hover:bg-primary-10 shadow-button-bordered disabled:shadow-none",
35-
"destructive": "bg-destructive-9 hover:bg-destructive-10 text-primary-contrast",
36-
"outline": "border border-secondary-a4 bg-secondary-1 hover:bg-secondary-3 text-secondary-12",
38+
"destructive": "bg-destructive-9 hover:bg-destructive-10 text-primary-contrast shadow-[0_0_0_1px_var(--destructive-9)_inset,0_2px_0_0_rgba(255,255,255,0.22)_inset]",
39+
"outline": "dark:shadow-[0_1px_0_0_rgba(255,255,255,0.08)_inset] bg-white hover:bg-secondary-2 dark:bg-secondary-3 dark:hover:bg-secondary-4 text-secondary-12 shadow-button-outline disabled:shadow-none",
40+
"outline-old": "border border-secondary-a4 bg-secondary-1 hover:bg-secondary-3 text-secondary-12",
3741
"outline-shadow": "dark:shadow-[0_1px_0_0_rgba(255,255,255,0.08)_inset] bg-white hover:bg-secondary-2 dark:bg-secondary-3 dark:hover:bg-secondary-4 text-secondary-12 shadow-button-outline disabled:shadow-none",
3842
"secondary": "bg-secondary-4 text-secondary-12 hover:bg-secondary-5",
3943
"ghost": "hover:bg-secondary-3 text-secondary-11",

reflex_ui/components/base/button.pyi

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ from reflex_ui.components.component import CoreComponent
1616

1717
LiteralButtonVariant = Literal[
1818
"primary",
19+
"primary-old",
1920
"primary-bordered",
2021
"destructive",
2122
"outline",
2223
"outline-shadow",
24+
"outline-old",
2325
"secondary",
2426
"ghost",
2527
"ghost-highlight",
@@ -32,10 +34,12 @@ LiteralButtonSize = Literal[
3234
DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:border disabled:border-secondary-4/80 disabled:bg-secondary-3 disabled:text-secondary-8 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 cursor-pointer box-border"
3335
BUTTON_VARIANTS = {
3436
"variant": {
35-
"primary": "bg-primary-9 text-primary-contrast hover:bg-primary-10",
37+
"primary": "bg-primary-9 text-primary-contrast hover:bg-primary-10 shadow-button-bordered disabled:shadow-none",
38+
"primary-old": "bg-primary-9 text-primary-contrast hover:bg-primary-10",
3639
"primary-bordered": "bg-primary-9 text-primary-contrast hover:bg-primary-10 shadow-button-bordered disabled:shadow-none",
37-
"destructive": "bg-destructive-9 hover:bg-destructive-10 text-primary-contrast",
38-
"outline": "border border-secondary-a4 bg-secondary-1 hover:bg-secondary-3 text-secondary-12",
40+
"destructive": "bg-destructive-9 hover:bg-destructive-10 text-primary-contrast shadow-[0_0_0_1px_var(--destructive-9)_inset,0_2px_0_0_rgba(255,255,255,0.22)_inset]",
41+
"outline": "dark:shadow-[0_1px_0_0_rgba(255,255,255,0.08)_inset] bg-white hover:bg-secondary-2 dark:bg-secondary-3 dark:hover:bg-secondary-4 text-secondary-12 shadow-button-outline disabled:shadow-none",
42+
"outline-old": "border border-secondary-a4 bg-secondary-1 hover:bg-secondary-3 text-secondary-12",
3943
"outline-shadow": "dark:shadow-[0_1px_0_0_rgba(255,255,255,0.08)_inset] bg-white hover:bg-secondary-2 dark:bg-secondary-3 dark:hover:bg-secondary-4 text-secondary-12 shadow-button-outline disabled:shadow-none",
4044
"secondary": "bg-secondary-4 text-secondary-12 hover:bg-secondary-5",
4145
"ghost": "hover:bg-secondary-3 text-secondary-11",
@@ -76,9 +80,11 @@ class Button(BaseButton, CoreComponent):
7680
"ghost-highlight",
7781
"link",
7882
"outline",
83+
"outline-old",
7984
"outline-shadow",
8085
"primary",
8186
"primary-bordered",
87+
"primary-old",
8288
"secondary",
8389
]
8490
| Var[
@@ -89,9 +95,11 @@ class Button(BaseButton, CoreComponent):
8995
"ghost-highlight",
9096
"link",
9197
"outline",
98+
"outline-old",
9299
"outline-shadow",
93100
"primary",
94101
"primary-bordered",
102+
"primary-old",
95103
"secondary",
96104
]
97105
]
@@ -366,9 +374,11 @@ class ButtonNamespace(ComponentNamespace):
366374
"ghost-highlight",
367375
"link",
368376
"outline",
377+
"outline-old",
369378
"outline-shadow",
370379
"primary",
371380
"primary-bordered",
381+
"primary-old",
372382
"secondary",
373383
]
374384
| Var[
@@ -379,9 +389,11 @@ class ButtonNamespace(ComponentNamespace):
379389
"ghost-highlight",
380390
"link",
381391
"outline",
392+
"outline-old",
382393
"outline-shadow",
383394
"primary",
384395
"primary-bordered",
396+
"primary-old",
385397
"secondary",
386398
]
387399
]

0 commit comments

Comments
 (0)