Wieldy
Search…
Updating Template Mode
Wieldy - Admin Dashboard is available in Light, Semi-Dark and Dark version. By default, Mode is set to the Semi-Dark version, but you can set the default version of your choice by following these simple steps.
To set the default Template Mode, go to following file:
src/appRedux/reducers/Settings.js
In this file, you can look for "themeType" property and set its value as per your choice.
To set the Light version, use value:- 'THEME_TYPE_LIGHT'
To set the Semi-Dark version, use value:- 'THEME_TYPE_SEMI_DARK'
To set the Dark version, use value:- 'THEME_TYPE_DARK'.
For Starter Templates: - If you want to set the Dark version, you need to follow two more step - 1. Add the following useEffect in src\containers\App\index.js
1
useEffect(() => {
2
if (themeType === THEME_TYPE_DARK) {
3
document.body.classList.add('dark-theme');
4
}
5
}, [themeType]);
Copied!
2. Open the file "styles.less" placed on the path -
src/styles/styles.less
In the bottom of this file, you will find a commented line of code: -
1
//@import "dark-theme"; // only use for dark theme
Copied!
To enable the dark mode, you need to include this line into your code(un-comment this line) and you are done.
Last modified 10mo ago
Copy link