CDN을 이용한 "pretendard variable" 웹폰트 적용 (성능 최적화 버전)
폰트 적용 코드 페이지 내에 안에 pretendard를 로드해주고,css에서 아래와 같이 적용하면 됨.body,input,textarea,select,button,table{ color: #101010; font-size: 12px; line-height: 16px; font-family: 'Pretendard Variable',Pretendard,-apple-system,BlinkMacSystemFont,"Malgun Gothic","맑은 고딕",helvetica,"Apple SD Gothic Neo",'Noto Sans KR',sans-serif; font-weight: 500; letter-spacing: -0.4px;} preload 사용 이유를 사용하면 브라..
2025. 4. 18.
(react) 반복작업 줄이기
지금까지 만든 코드는 각 prop의 값만 다르고 반복적이기 때문에 javascript의 iteration을 이용해서 코드를 정리해줄 수 있음~코드의 다른 부분은 객체 배열을 사용해서 데이터를 만들어줌.const DATA = [ { id: "todo-0", name: "Eat", completed: true }, { id: "todo-1", name: "Sleep", completed: false }, { id: "todo-2", name: "Repeat", completed: false },]; 그리고 DATA를 에 tast라는 prop으로 전달해주는데, src/main.jsx 내부에서 구성 요소 호출을 아래 코드와 같이 업데이트 해줌. DATA 배열은 이제 App 구성 요소 내부에서 props..
2024. 11. 24.