react-toggle-theme
A simple component to switch between dark and light themes
Install
yarn add react-toggle-theme
npm install --save react-toggle-theme
Usage
;; { const currentTheme setCurrentTheme = React; React; return <div className="app-container" style= backgroundColor: currentTheme === "light" ? "#000" : "#fff" > <ToggleTheme selectedTheme=currentTheme onChange=setCurrentTheme /> </div> ;} ;