Skip to content

Commit

Permalink
style: new button styles
Browse files Browse the repository at this point in the history
related to #78
  • Loading branch information
JeelRajodiya committed Oct 6, 2024
1 parent a7678e3 commit 6e1bd19
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/components/CodeEditor/CodeEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export default function CodeEditor({
color={
outputResult.validityStatus === "valid"
? "white"
: "hsl(var(--success))"
: "hsl(var(--background))"
}
/>
</MyBtn>
Expand Down
37 changes: 26 additions & 11 deletions app/styles/theme.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
import { extendTheme } from "@chakra-ui/react";

const Button = {

baseStyle: {
boxShadow: "-4px 4px 0px 0",
border: "1px solid hsl(var(--background)/0.5)",
_hover: {
transform: "translateX(-2px) translateY(2px)",
boxShadow: "-2px 2px 0px 0",
},
_active: {
transform: "translateX(-4px) translateY(4px)",
boxShadow: "0px 0px 0px 0",
}
},
variants: {
default: {
color: "white",
bg: "hsl(var(--primary))",
_hover: {
bg: "hsl(var(--primary) / 0.8)",
bg: "hsl(var(--primary))",
_disabled: {
bg: "hsl(var(--primary) / 0.6)",
},
Expand All @@ -16,40 +29,42 @@ const Button = {
},
},
success: {
color: "hsl(var(--success))",

borderColor: "hsl(var(--success))",
borderWidth: "1px",
bg: "hsl(var(--success))",
color: "black",
boxShadow: "-4px 4px 0px 0 hsl(var(--text))",
_disabled: {
color: "hsl(var(--success) / 0.6)",
},
_hover: {
bg: "hsl(var(--success))",
color: "black",
boxShadow: "-2px 2px 0px 0 hsl(var(--text))",

_disabled: {
color: "hsl(var(--success) / 0.4)",
},
},
_active: {
bg: "hsl(var(--success))",
bg: "hsl(var(--success)/0.8)",
boxShadow: "0px 0px 0px 0 hsl(var(--text))",

},
},
error: {
color: "hsl(var(--error))",
borderColor: "hsl(var(--error))",

borderWidth: "1px",
bg: "hsl(var(--error))",
color: "white",
_disabled: {
color: "hsl(var(--error) / 0.6)",
},
_hover: {
bg: "hsl(var(--error))",
color: "white",
_disabled: {
color: "hsl(var(--error) / 0.4)",
},
},
_active: {
bg: "red.200",
bg: "hsl(var(--error) / 0.4)",
},
},
},
Expand Down

0 comments on commit 6e1bd19

Please sign in to comment.