Created
April 8, 2020 08:22
-
-
Save btodts/6914bbca824e1ac6adce591aecaec1c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import styled from "styled-components"; | |
import theme from "styled-theming"; | |
import { Provider as ReduxProvider } from "react-redux"; | |
import DarkThemeProvider from "./DarkThemeProvider"; | |
import store from "./store"; | |
import DarkThemeToggle from "./DarkThemeToggle"; | |
export const backgroundColor = theme("theme", { | |
light: "#fff", | |
dark: "#2d2d2d", | |
}); | |
export const textColor = theme("theme", { | |
light: "#000", | |
dark: "#fff", | |
}); | |
const Container = styled.div` | |
display: flex; | |
flex-direction: column; | |
width: 100vw; | |
height: 100vh; | |
align-items: center; | |
justify-content: center; | |
font-family: sans-serif; | |
background-color: ${backgroundColor}; | |
color: ${textColor}; | |
`; | |
const App = () => ( | |
<ReduxProvider store={store}> | |
<DarkThemeProvider> | |
<Container> | |
<h1>My Dark Theme Is Better Than Yours</h1> | |
<DarkThemeToggle></DarkThemeToggle> | |
</Container> | |
</DarkThemeProvider> | |
</ReduxProvider> | |
); | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment