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
1 changed files with 2 additions and 3 deletions

View File

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