fix themes v1 not working
This commit is contained in:
parent
c4d218cb3e
commit
ac85cdac68
@ -1,3 +1,4 @@
|
|||||||
|
import { convert } from 'chromatism'
|
||||||
import allKeys from './theme2_keys'
|
import allKeys from './theme2_keys'
|
||||||
|
|
||||||
// keys that are meant to be used globally, i.e. what's the rest of the theme is based upon.
|
// keys that are meant to be used globally, i.e. what's the rest of the theme is based upon.
|
||||||
@ -125,7 +126,8 @@ export const convertTheme2To3 = (data) => {
|
|||||||
data.colors.link = data.colors.link || data.colors.accent
|
data.colors.link = data.colors.link || data.colors.accent
|
||||||
const generateRoot = () => {
|
const generateRoot = () => {
|
||||||
const directives = {}
|
const directives = {}
|
||||||
basePaletteKeys.forEach(key => { directives['--' + key] = 'color | ' + data.colors[key] })
|
console.log(data.colors)
|
||||||
|
basePaletteKeys.forEach(key => { directives['--' + key] = 'color | ' + convert(data.colors[key]).hex })
|
||||||
return {
|
return {
|
||||||
component: 'Root',
|
component: 'Root',
|
||||||
directives
|
directives
|
||||||
|
Loading…
Reference in New Issue
Block a user