theme-toggler-ak
v1.0.17
Published
a simple theme toggling function for ReactJS
Downloads
101
Readme
Theme Toggler
Welcome to the theme-toggler-ak
package! This package provides a simple theme toggling component for React.
To get started, here are a few instructions you might find useful:
- Import 'useState' in your React component where would you like to use this package and create a state for the theme.
Example: const [theme, setTheme] = useState({ bgColor: "white", textColor: "black" });
- Import the component 'ThemeToggler' in your React project and then pass the desired colors using the props:
Example:
<ThemeToggler
bgColor1="white"
bgColor2="black"
textColor1="black"
textColor2="white"
setTheme={setTheme}
/>
(note: please make sure you have already installed Vite)
Happy coding!