Toggle dark mode with Theme Darker
Below Command is an example of how to install Theme Darker
npm
npm install theme-darker@latest -g
clone
git clone https://github.com/HJ2Yoon/themedarker.git ./
Getting started with theme darker
import { Theme, ThemeDarker } from 'theme-darker';
Enums
-
LIGHT
: light mode -
DARK
: dark mode
Example
enum Theme {
LIGHT,
DARK,
}
It's a Component that has three arguments
Params
-
theme
{ Theme | undefined }: Put your current theme -
toggleTheme
{ () => void }: The function to set theme. -
size
{ number }: Size of component
Example
<ThemeDarker
theme={curTheme === Theme.LIGHT ? Theme.DARK : Theme.LIGHT}
toggleTheme={toggleTheme}
size={15}
/>
📄 v0.3.0 ✅ (Valid version)
- Button reface
v0.2.0
- v0.2.3 -dev
- v0.2.2 -dev
- v0.2.1 -dev ❌ (Error exist)
- v0.2.0 -dev ❌ (Error exist)
📄 v0.1.0 ❌ (Error exist)
- Work in progress
[MIT]