I'm starting now to learn next. I'm kind of lost on how to apply the createGlobalStyle feature of the sytled components in the framework.
You can use a custom app, by creating a _app.js file in pages directory
import { createGlobalStyle } from 'styled-components'
const GlobalStyle = createGlobalStyle`
body {
color: ${props => (props.whiteColor ? 'white' : 'black')};
}
`
function MyApp({ Component, pageProps }) {
return <><GlobalStyle whiteColor /><Component {...pageProps} /></>
}
export default MyApp
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments