theme-darker
v0.3.1
Published
This is darkmode theme toggle button component!
Downloads
8
Maintainers
Readme
Theme Darker 🌗
Toggle dark mode with Theme Darker
Installation
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 ./
Usage
Getting started with theme darker
import { Theme, ThemeDarker } from 'theme-darker';
Theme
Enums
LIGHT
: light modeDARK
: dark mode
Example
enum Theme {
LIGHT,
DARK,
}
ThemeDarker
It's a Component that has three arguments
Params
theme
{ Theme | undefined }: Put your current themetoggleTheme
{ () => 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}
/>
Release History
📄 v0.3.0 ✅ (Valid version)
- Button reface
- 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
License
[MIT]