Skip to content

Commit 6e1bd19

Browse files
committed
style: new button styles
related to #78
1 parent a7678e3 commit 6e1bd19

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

app/components/CodeEditor/CodeEditor.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export default function CodeEditor({
139139
color={
140140
outputResult.validityStatus === "valid"
141141
? "white"
142-
: "hsl(var(--success))"
142+
: "hsl(var(--background))"
143143
}
144144
/>
145145
</MyBtn>

app/styles/theme.ts

+26-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
import { extendTheme } from "@chakra-ui/react";
22

33
const Button = {
4+
5+
baseStyle: {
6+
boxShadow: "-4px 4px 0px 0",
7+
border: "1px solid hsl(var(--background)/0.5)",
8+
_hover: {
9+
transform: "translateX(-2px) translateY(2px)",
10+
boxShadow: "-2px 2px 0px 0",
11+
},
12+
_active: {
13+
transform: "translateX(-4px) translateY(4px)",
14+
boxShadow: "0px 0px 0px 0",
15+
}
16+
},
417
variants: {
518
default: {
619
color: "white",
720
bg: "hsl(var(--primary))",
821
_hover: {
9-
bg: "hsl(var(--primary) / 0.8)",
22+
bg: "hsl(var(--primary))",
1023
_disabled: {
1124
bg: "hsl(var(--primary) / 0.6)",
1225
},
@@ -16,40 +29,42 @@ const Button = {
1629
},
1730
},
1831
success: {
19-
color: "hsl(var(--success))",
2032

21-
borderColor: "hsl(var(--success))",
2233
borderWidth: "1px",
34+
bg: "hsl(var(--success))",
35+
color: "black",
36+
boxShadow: "-4px 4px 0px 0 hsl(var(--text))",
2337
_disabled: {
2438
color: "hsl(var(--success) / 0.6)",
2539
},
2640
_hover: {
27-
bg: "hsl(var(--success))",
28-
color: "black",
41+
boxShadow: "-2px 2px 0px 0 hsl(var(--text))",
42+
2943
_disabled: {
3044
color: "hsl(var(--success) / 0.4)",
3145
},
3246
},
3347
_active: {
34-
bg: "hsl(var(--success))",
48+
bg: "hsl(var(--success)/0.8)",
49+
boxShadow: "0px 0px 0px 0 hsl(var(--text))",
50+
3551
},
3652
},
3753
error: {
38-
color: "hsl(var(--error))",
39-
borderColor: "hsl(var(--error))",
54+
4055
borderWidth: "1px",
56+
bg: "hsl(var(--error))",
57+
color: "white",
4158
_disabled: {
4259
color: "hsl(var(--error) / 0.6)",
4360
},
4461
_hover: {
45-
bg: "hsl(var(--error))",
46-
color: "white",
4762
_disabled: {
4863
color: "hsl(var(--error) / 0.4)",
4964
},
5065
},
5166
_active: {
52-
bg: "red.200",
67+
bg: "hsl(var(--error) / 0.4)",
5368
},
5469
},
5570
},

0 commit comments

Comments
 (0)