GitHub-ReadMe icon indicating copy to clipboard operation
GitHub-ReadMe copied to clipboard

🚀 [New Component_WebApp] - Want to add toggle button to change the theme of the website white to black

Open HimanshuNarware opened this issue 1 year ago • 2 comments

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)

174

Additional information

No response

Contributor terms

  • [X] I agree to follow the Contributing Instructions

HimanshuNarware avatar Jun 08 '23 12:06 HimanshuNarware

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! 😀

github-actions[bot] avatar Jun 08 '23 12:06 github-actions[bot]

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?

Bhagyesh2003 avatar Jun 11 '23 15:06 Bhagyesh2003