Skip to content

Commit daaa922

Browse files
authored
Merge pull request #40 from arturbien/hatched-background-on-active-buttons
finished
2 parents d652580 + c5c26cd commit daaa922

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/components/Button/Button.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ const StyledButton = styled.button`
5050
${createBoxStyles()};
5151
${({ active }) =>
5252
active ? createBorderStyles(true) : createBorderStyles(false)}
53+
${({ active, theme }) =>
54+
active &&
55+
`background-image: ${
56+
theme.hatchedBackground
57+
};`}
58+
5359
&:active {
5460
${({ isDisabled }) => !isDisabled && createBorderStyles(true)}
5561
}

src/components/common/themes.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
const themes = {};
22

33
themes.default = {
4+
hatchedBackground:
5+
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAIElEQVQYV2P8////fwYGBgZGRkZGMI0hABIFAbgEugAAQFQP/QfjEPcAAAAASUVORK5CYII=)",
6+
47
canvas: "#ffffff",
58
material: "#ced0cf",
69
materialDark: "#9a9e9c",
@@ -38,6 +41,9 @@ themes.default = {
3841
};
3942

4043
themes.water = {
44+
hatchedBackground:
45+
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAIElEQVQYV2P8////fwYGBgZGRkZGMI0hABIFAbgEugAAQFQP/QfjEPcAAAAASUVORK5CYII=)",
46+
4147
canvas: "#ffffff",
4248
material: "#ced0cf",
4349
materialDark: "#9a9e9c",
@@ -75,6 +81,9 @@ themes.water = {
7581
};
7682

7783
themes.coldGray = {
84+
hatchedBackground:
85+
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAIElEQVQYV2P8////fwYGBgZGRkZGMI0hABIFAbgEugAAQFQP/QfjEPcAAAAASUVORK5CYII=)",
86+
7887
// background: "#CCF5AC",
7988
// background: "#416165",
8089
background: "#4C6663",
@@ -116,6 +125,9 @@ themes.coldGray = {
116125
};
117126

118127
themes.lilacRoseDark = {
128+
hatchedBackground:
129+
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAIElEQVQYV2P8////fwYGBgZGRkZGMI0hABIFAbgEugAAQFQP/QfjEPcAAAAASUVORK5CYII=)",
130+
119131
background: "#3B3B58",
120132

121133
canvas: "#dab1c7",
@@ -155,6 +167,9 @@ themes.lilacRoseDark = {
155167
};
156168

157169
themes.violetDark = {
170+
hatchedBackground:
171+
"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAIElEQVQYV2P8////fwYGBgZGRkZGMI0hABIFAbgEugAAQFQP/QfjEPcAAAAASUVORK5CYII=)",
172+
158173
canvas: "#c47bcc",
159174
material: "#652a6d",
160175
materialDark: "#210e23",

0 commit comments

Comments
 (0)