GitHub-ReadMe
GitHub-ReadMe copied to clipboard
🚀 [New Component_WebApp] - Want to add toggle button to change the theme of the website white to black
Describe the need for this component. ✍🏻
Want to add toggle button to change the theme of the website white to black.
Describe briefly how you would implement and plan to use this component.
Some steps to implement this new component-
1. Add toggle button on navbar
2. when some click on the toggle button the theme of the website is change
3. Step 3
Screenshots Example (if applicable)
Additional information
No response
Contributor terms
- [X] I agree to follow the Contributing Instructions
Hello @HimanshuNarware! Thank you for raising this issue.
Please make sure to follow our Contributing Guidelines. 💪🏻 Don't forget to ⭐ our GitHub-ReadMe. 📃
Our review team will carefully assess the issue and reach out to you soon! 😇 We appreciate your patience! 😀
Hey, I can add this feature: My approach: First I will use the React's 'useState' hook to track the current state of the website. In the src folder I can add a state file in which I will define a setMode function which goes like this- setMode: (state) => { state.mode = state.mode === "light" ? "dark" : "light"; This can be imported in the Home.js file on the navbar as a toggle switch and its state can be changed using onClick function. Can you assign me this feature?