shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
setTheme
Type:Function
Status:stable
Since:1.0.0
Platform:js
@blackbyte.sugar.js.theme
This function allows you to set a theme for your website/application.
It will set the theme on the body tag like theme-... and set a cookie to remember the theme.
Params
- theme*-String
The theme name to set
- settings{}TSetThemeSettings
Some settings to configure your theme setter
Example
import { setTheme } from '@blackbyte/sugar/theme';
setTheme('dark');Settings
- cookieName’theme’String
The cookie name to use to store the theme
Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space