Create light dark theme html css js in react

Negar Karami
Jan 10, 2021

--

App.js

light dark theme is for when we want the graphical environment of our application or site
It has two black and white theme modes that the user can easily change each one by opening a button And it works with the site or application environment. The choice of black theme is due to less damage to the user's eyes.
To Create a light dark theme you need to write the following code in App.js:
import UseState, ThemeProvider, and SplashPage
define color with object format
use of UseState, ThemeProvider , Splash in function App and export of function App
Splash.js
import Icons, style-component for project
Styling with style-component
Styling with style-component

in this part use of props for pass data of App Component to splash Component and put Command if for styling colors ans use variable style-component as tag in splash Component .

--

--