aboutsummaryrefslogtreecommitdiff
path: root/src/services/style_setter
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/style_setter')
-rw-r--r--src/services/style_setter/style_setter.js25
1 files changed, 7 insertions, 18 deletions
diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js
index e7d8252c..69a1b899 100644
--- a/src/services/style_setter/style_setter.js
+++ b/src/services/style_setter/style_setter.js
@@ -81,7 +81,6 @@ const setColors = (input, commit) => {
head.appendChild(styleEl)
const styleSheet = styleEl.sheet
- console.log(rules)
styleSheet.toString()
styleSheet.insertRule(`body { ${rules.radii} }`, 'index-max')
styleSheet.insertRule(`body { ${rules.colors} }`, 'index-max')
@@ -108,7 +107,6 @@ const getCssShadow = (input) => {
}
const generateColors = (input) => {
- console.log(input.opacity)
const colors = {}
const opacity = Object.assign({
alert: 0.5,
@@ -120,7 +118,6 @@ const generateColors = (input) => {
}
return acc
}, {}))
- console.log(colors, opacity)
const col = Object.entries(input.colors || input).reduce((acc, [k, v]) => {
if (typeof v === 'object') {
acc[k] = v
@@ -216,26 +213,19 @@ const generateColors = (input) => {
}
const generateRadii = (input) => {
- const inputRadii = input.radii || {
- btn: input.btnRadius,
- input: input.inputRadius,
- panel: input.panelRadius,
- avatar: input.avatarRadius,
- avatarAlt: input.avatarAltRadius,
- tooltip: input.tooltipRadius,
- attachment: input.attachmentRadius
- }
-
- const radii = {
+ console.log(input)
+ const radii = Object.entries(input.radii).filter(([k, v]) => v).reduce((acc, [k, v]) => {
+ acc[k] = v
+ return acc
+ }, {
btn: 4,
input: 4,
panel: 10,
avatar: 5,
avatarAlt: 50,
tooltip: 2,
- attachment: 5,
- ...inputRadii
- }
+ attachment: 5
+ })
return {
rules: {
@@ -259,7 +249,6 @@ const generateShadows = (input) => {
}],
...(input.shadows || {})
}
- console.log('benis')
return {
rules: {