setColors -> applyTheme. For sanity. Also disabled export because nobody uses it

and should not use anyway.
This commit is contained in:
Henry Jameson 2018-12-11 01:39:18 +03:00
parent fe2fe09236
commit 4b25475b57

View file

@ -71,7 +71,7 @@ const getTextColor = function (bg, text, preserve) {
return text
}
const setColors = (input, commit) => {
const applyTheme = (input, commit) => {
const { rules, theme } = generatePreset(input)
const head = document.head
const body = document.body
@ -516,7 +516,7 @@ const setPreset = (val, commit) => {
// load config -> set preset -> wait for styles.json to load ->
// load persisted state -> set colors -> styles.json loaded -> set colors
if (!window.themeLoaded) {
setColors(data, commit)
applyTheme(data, commit)
}
})
}
@ -524,7 +524,6 @@ const setPreset = (val, commit) => {
export {
setStyle,
setPreset,
setColors,
getTextColor,
generateColors,
generateRadii,