Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 1.3 KB

aula37.md

File metadata and controls

52 lines (42 loc) · 1.3 KB

Estudando ReactJS

Aula 06: Estilos globais.

Figma do Projeto.

  • criado arquivo global.ts, dentro de src/styles.
import { createGlobalStyle } from 'styled-components';

export const GlobalStyle = createGlobalStyle`
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  body {
    background: #333;
    color: #FFF;
  }
`;
import { ThemeProvider } from "styled-components";
import { Button } from "./components/Button";
import { GlobalStyle } from "./styles/global";
import { defaultTheme } from "./styles/themes/default";

export function App() {
  return (
    <ThemeProvider theme={defaultTheme}>
      <Button variant="primary" />
      <Button variant="secondary" />
      <Button variant="success" />
      <Button variant="danger" />
      <Button />

      <GlobalStyle />
    </ThemeProvider>
  )
}

Voltar ao início!