diff --git a/components/GlobalStyles.tsx b/components/GlobalStyles.tsx new file mode 100644 index 0000000..afe3a64 --- /dev/null +++ b/components/GlobalStyles.tsx @@ -0,0 +1,30 @@ +import { FC, useContext } from 'react'; +import { createGlobalStyle } from 'styled-components'; +import { DarkModeContext } from '../components/DarkMode'; + +export interface Props { + dark: boolean; +} + +const Global = createGlobalStyle` + * { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: 'Source Code Pro', monospace; + font-size: 17px; + } + + body { + background: ${({ dark }) => (dark ? '#262626' : '#F9F9F9')}; + color: ${({ dark }) => (dark ? 'white' : 'black')}; + } +`; + +const GlobalStyles: FC = () => { + const { dark } = useContext(DarkModeContext); + + return ; +}; + +export default GlobalStyles;