Created
March 5, 2022 13:31
-
-
Save buglessir/d99840b253b9bc297e92a1b236fd4cad to your computer and use it in GitHub Desktop.
An example of GlobalStyles with styled-components
This file contains hidden or 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 { createGlobalStyle } from 'styled-components'; | |
const GlobalStyles = createGlobalStyle` | |
body { | |
overflow-y: hidden; | |
} | |
`; | |
const PageWithoutScrollbar = () => { | |
return ( | |
<> | |
<GlobalStyles /> | |
<h1>Hello</h1> | |
</> | |
) | |
} | |
export default PageWithoutScrollbar; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment