From 0b8aedd4881f6d7f63d3909cfd964061a1ba3ea0 Mon Sep 17 00:00:00 2001 From: alexnatalia Date: Wed, 11 Nov 2020 18:03:11 +0300 Subject: [PATCH 1/2] Fixed colors customization bug. --- src/stories/Intro/Customization.stories.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/stories/Intro/Customization.stories.ts b/src/stories/Intro/Customization.stories.ts index 43df1693..17083f81 100644 --- a/src/stories/Intro/Customization.stories.ts +++ b/src/stories/Intro/Customization.stories.ts @@ -10,10 +10,11 @@ export default { excludeStories: /.*Data$/ } -const getColorsData = (colors) => Object.values(colors).map(color => { - const value = getComputedStyle(document.documentElement).getPropertyValue(`--s-color-${color}`) +const colorPropertyPrefix = '--s-color-' +const getColorsData = (colors) => Object.values(colors).map(colorPropertyName => { + const value = getComputedStyle(document.documentElement).getPropertyValue(`${colorPropertyPrefix}${colorPropertyName}`) const isRgb = value.includes('rgb') - return { label: color, value, isRgb } + return { label: colorPropertyName, value, isRgb } }) export const colorsSectionsData = [ { title: 'Theme / Accent', colors: getColorsData(AccentColors) }, @@ -84,7 +85,7 @@ export const configurable = () => ({ }), methods: { handleColorChange: (label: string, color: string) => { - document.documentElement.style.setProperty(label, color) + document.documentElement.style.setProperty(`${colorPropertyPrefix}${label}`, color) } } }) From 75ed88bdb3aa9e1e60e140239f3b2c683622339d Mon Sep 17 00:00:00 2001 From: alexnatalia Date: Wed, 11 Nov 2020 18:05:28 +0300 Subject: [PATCH 2/2] Updated to 0.5.7 version. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 70a1dd7f..edce40d6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@soramitsu/soramitsu-js-ui", - "version": "0.5.6", + "version": "0.5.7", "private": false, "publishConfig": { "registry": "https://nexus.iroha.tech/repository/npm-soramitsu-private/"