xthemes
v1.0.6
Published
xThemes is module made in `Vanilla JavaScript` without any other modules for fast operations.
Downloads
2
Readme
xThemes
xThemes is module made in Vanilla JavaScript
without any other modules for fast operations.
Note: default theme is always default
and can't be changed yet.
Note (Usage): Always execute the code in the main code file. (for react it's the main file where the content renders | main.tsx)
Usage
import { setTheme } from 'xthemes' // import xThemes setTheme function
import { colors } from './vars.ts' // import your file with colors
colors // execute colors
setTheme("<theme_name>") // set for your theme | leave empty for default
File with Colors:
import { themeSet } from 'xthemes'
export const colors = themeSet({
primaryColor: {
default: '#000',
<custom_theme>: '#fff',
},
primaryBackground: {
default: '#fff',
<custom_theme>: '#000',
}
})
Usage in CSS:
color: var(--primaryColor),
background: var(--primaryBackground)