Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
jcwillox committed Jul 5, 2020
1 parent 2d2f28d commit 350268d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ export const VERTICAL_STACK_IN_CARD_STYLE = `
margin-top: -24px;
}
`;

export const NO_CARD_STYLE = {
boxShadow: "none",
background: "none"
}
4 changes: 3 additions & 1 deletion src/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export function coerceObject(data = {}) {

export function applyTheme(element, themes, localTheme) {
if (localTheme in themes.themes) {
element.style.cssText = mapStyle(themes.themes[localTheme], "--");
for (const [key, value] of Object.entries(themes.themes[localTheme])) {
element.style.setProperty("--" + key, value);
}
}
}

0 comments on commit 350268d

Please sign in to comment.