일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- typescript react
- nextjs .env
- nextjs
- getModifierState
- styled components
- API token
- react env
- icon
- nextjs 설치
- github
- npm styled-reset
- react
- ngrok실행
- fetch
- next.js css
- API 토큰
- bootstrap
- rewrites
- 컨디셔널 렌더링
- dart 변수
- git lab
- createGlobalStyle
- There isn’t anything to compare
- CSS
- input type=file
- react typescript
- SCSS
- Git
- github io
- ngrok설치
- Today
- Total
목록styled components (2)
꾸준히 성장하는 개발자

dark mode light mode styled components를 이용하면 테마를 이렇게 바꾸는 것이 가능하다 //Index.js import React from "react"; import ReactDOM from "react-dom"; import { ThemeProvider } from "styled-components"; import App from "./App"; const darkTheme = { textColor: "whitesmoke", backgroundColor: "#111", }; const lightTheme = { textColor: "#111", backgroundColor: "whitesmoke", }; ReactDOM.render( , document.getElement..
스타일을 자동으로 넣어주고 클래스네임도 자동으로 넣어주는 기능 최대한 오염이 되지 않는 스타일을 먹일수 있는 좋은 방법이다. 터미널에 작성하여 install 해준다. npm i styled-components 설치가 다 되었으면 사용해보자 사용하는 방법으로 버튼 import styled from 'styled-components'; const StyledButton =styled.button` background : transparent; border-radius:3px; border:2px solid palevioletred; color: palevioletred; margin: 0 1em; padding: 0.25em 1em; font-size:20px; `; export default StyledB..