Skip to content

Instantly share code, notes, and snippets.

@RochaGabriell
Created August 26, 2023 12:43
Show Gist options
  • Save RochaGabriell/d941613b0a385fdf38abc0211ddf36b7 to your computer and use it in GitHub Desktop.
Save RochaGabriell/d941613b0a385fdf38abc0211ddf36b7 to your computer and use it in GitHub Desktop.
Creating a createGlobalStyle
import { createGlobalStyle } from 'styled-components';
const GlobalStyle = createGlobalStyle`
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body, #root {
height: 100%;
background-color: red;
}
*, button, input {
border: 0;
outline: 0;
font-family: 'Roboto', sans-serif;
}
button {
cursor: pointer;
}
:root {
--primary: #36393f;
--secondary: #2f3136;
--tertiary: rgb(32,34,37);
--quaternary: #292b2f;
--quinary: #393d42;
--senary: #828386;
--white: #fff;
--gray: #8a8c90;
}
`
export default GlobalStyle
// Importando o estilo global
import GlobalStyle from './styles/GlobalStyles'
ReactDOM.createRoot(document.getElementById('root')).render(
<React.StrictMode>
<GlobalStyle />
<RouterProvider router={Routes} />
</React.StrictMode>,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment