-
Notifications
You must be signed in to change notification settings - Fork 754
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Button style upgrades * refactor(card): Moved theme values to component * chore: Updated story * refactor(Card): Moved theme to card folder * refactor(button): Added button theme * feat(theme): Split out base colors
- Loading branch information
1 parent
bb4c67e
commit 576c2a1
Showing
13 changed files
with
213 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { ButtonTheme, variants } from "./types"; | ||
import { lightColors, darkColors } from "../../theme/colors"; | ||
|
||
const { PRIMARY, SECONDARY, TERTIARY, TEXT } = variants; | ||
|
||
export const light: ButtonTheme = { | ||
[PRIMARY]: { | ||
background: lightColors.primary, | ||
backgroundActive: lightColors.primaryDark, | ||
backgroundHover: lightColors.primaryBright, | ||
border: 0, | ||
borderColorHover: "currentColor", | ||
boxShadow: "inset 0px -1px 0px rgba(14, 14, 44, 0.4)", | ||
boxShadowActive: "inset 0px -1px 0px rgba(14, 14, 44, 0.4)", | ||
color: "#FFFFFF", | ||
}, | ||
[SECONDARY]: { | ||
background: "transparent", | ||
backgroundActive: "transparent", | ||
backgroundHover: "transparent", | ||
border: `2px solid ${lightColors.primary}`, | ||
borderColorHover: lightColors.primaryBright, | ||
boxShadow: "none", | ||
boxShadowActive: "none", | ||
color: lightColors.primary, | ||
}, | ||
[TERTIARY]: { | ||
background: lightColors.tertiary, | ||
backgroundActive: lightColors.tertiary, | ||
backgroundHover: lightColors.tertiary, | ||
border: 0, | ||
borderColorHover: "currentColor", | ||
boxShadow: "none", | ||
boxShadowActive: "none", | ||
color: lightColors.primary, | ||
}, | ||
[TEXT]: { | ||
background: "transparent", | ||
backgroundActive: "transparent", | ||
backgroundHover: lightColors.tertiary, | ||
border: 0, | ||
borderColorHover: "currentColor", | ||
boxShadow: "none", | ||
boxShadowActive: "none", | ||
color: lightColors.primary, | ||
}, | ||
}; | ||
|
||
export const dark: ButtonTheme = { | ||
[PRIMARY]: { | ||
...light.primary, | ||
}, | ||
[SECONDARY]: { | ||
...light.secondary, | ||
}, | ||
[TERTIARY]: { | ||
...light.tertiary, | ||
background: darkColors.tertiary, | ||
backgroundActive: darkColors.tertiary, | ||
backgroundHover: darkColors.tertiary, | ||
color: darkColors.primary, | ||
}, | ||
[TEXT]: { | ||
...light.text, | ||
backgroundHover: darkColors.tertiary, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { CardTheme } from "./types"; | ||
|
||
export const light: CardTheme = { | ||
background: "#FFFFFF", | ||
boxShadow: "1px solid rgba(14, 14, 44, 0.05)", | ||
}; | ||
|
||
export const dark: CardTheme = { | ||
background: "#2B223E", | ||
boxShadow: "1px solid rgba(14, 14, 44, 0.05)", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export type CardTheme = { | ||
background: string; | ||
boxShadow: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Colors } from "../styled.d"; | ||
|
||
export const baseColors = { | ||
failure: "#ED4B9E", | ||
primary: "#1FC7D4", | ||
primaryBright: "#53DEE9", | ||
primaryDark: "#0098A1", | ||
secondary: "#7645D9", | ||
success: "#31D0AA", | ||
}; | ||
|
||
export const lightColors: Colors = { | ||
...baseColors, | ||
background: "#FAF9FA", | ||
backgroundDisabled: "#E9EAEB", | ||
contrast: "#191326", | ||
input: "#F4F2F7", | ||
tertiary: "#EFF4F5", | ||
text: "#452A7A", | ||
textDisabled: "#BDC2C4", | ||
textSubtle: "#AEA0D6", | ||
}; | ||
|
||
export const darkColors: Colors = { | ||
...baseColors, | ||
background: "#191326", | ||
backgroundDisabled: "#524B63", | ||
contrast: "#FFFFFF", | ||
input: "#151021", | ||
primaryDark: "#0098A1", | ||
tertiary: "#293450", | ||
text: "#ED4B9E", | ||
textDisabled: "#302B38", | ||
textSubtle: "#A28BD4", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.