일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- JS
- API
- 선택자
- ChatGPT
- ES6+
- react
- 함수
- github
- next.js
- 변수
- 최적화
- 햇소
- ES5+
- JavaScript
- hooks
- hatso
- object
- 우아한테코톡
- Python
- dev
- DOM
- html5
- gitCLI
- learn next.js
- es6
- This
- array
- git
- CSS
- AI
Archives
- Today
- Total
목록golobalstyle (1)
codinghatso

theme.js import { createGlobalStyle } from "styled-components"; export const GlobalStyle = createGlobalStyle` @import url('https://fonts.googleapis.com/...'); body{ font-family: 'Dongle', sans-serif; ... } `; export const theme = { colors: { ... }, spacing: { ... }, }; 코드의 구조를 살펴보시면 GlobalStyle과 theme를 export 해서 적용시키고자 하는 파일에서 import 해서 사용하면 됩니다. styled-components 라이브러리를 사용해서 적용시키고자 한다면, 위 코드처럼 ..
WEB/React
2024. 1. 12. 12:28