We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi @donavon, Is it OK to add an initial toggle component? If the answer is yes I'll be happy to work on it.
The text was updated successfully, but these errors were encountered:
for everybody who has missed a toggle component. I have simply used the react-toggle-component.
react-toggle-component
npm install react-toggle-component styled-components
And then my dark mode component looks like the following:
import useDarkMode from 'use-dark-mode' import { Toggle } from 'react-toggle-component' const DarkModeToggle = () => { const darkMode = useDarkMode(false); return ( <div> <span role="img" aria-label="sun">🔆</span> <Toggle leftBackgroundColor="#ffffff" rightBackgroundColor="#1a1919" borderColor="black" knobColor="#006aff" name="toggle-switch" checked={darkMode.value} onChange={darkMode.toggle} /> <span role="img" aria-label="moon">🌙</span> </div> ); }; export default DarkModeToggle;
Sorry, something went wrong.
No branches or pull requests
Hi @donavon, Is it OK to add an initial toggle component? If the answer is yes I'll be happy to work on it.
The text was updated successfully, but these errors were encountered: