Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- reactjs
- 개발콘텐츠
- utilty type
- 커스텀
- NonNullable
- 누구나 자료구조와 알고리즘
- 공통컴포넌트
- returnType
- 반복줄이기
- 성능최적화
- React.js
- 티스토리꾸미기
- const 단언문
- 레이아웃쪼개기
- React Native
- react
- 타입좁히기
- vue.js
- CSS
- 2022
- 타입스크립트
- 제네릭
- javascript
- click and drag
- JS console
- TSDoc
- typescript
- 리액트
- 폰트적용하기
- Chart.js
Archives
- Today
- Total
목록공통컴포넌트 (1)
몽땅뚝딱 개발자


테마를 분리해보자.... 해내고나니 뿌듯하다... ^_ ^ㅋ 다만 리팩토링이 필요하다. 1. type으로 선언했는데 interface와 구분이 잘 되지 않는다. 좀 더 알아본 뒤 변경해야 할 것 같다. 2. 좀 더 공통화 할 수 있는 부분이 있을 것 같다. 3. 기본값도 유니온을 사용해서 type으로 만들 수 있을 듯?! 📄 CommonButton.tsx import styled, { css } from 'styled-components' // ... function CommonButton(props: ButtonProps) { return ( {props.label} ) } export default CommonButton ButtonProps는 이렇게 지정해주었다. /** * **label**: 버튼..
Development/React.js · Next.js
2023. 2. 9. 11:59