-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/icon #5
Conversation
다른 방법도 한번 다시 시도해보고 reopen 할게요 |
한 컴포넌트에서 모두 import하는게 걸리신다면.. 음.. 저 다른프로젝트에서 이미지파일을 // 예시: utils/icon.ts
import ArrowBack from "../public/icons/arrow-back.svg";
import ArrowRight from "../public/icons/arrow-right.svg";
...
export const ICONS = {
ArrowBack,
ArrowRight,
...
}; // conponents/icon/icon.tsx
import {ICONS} from "../../utils/icon";
const nameIconMap = {
"arrow-back": ICONS.ArrowBack,
...
} 이런식으로요... 장점은 컴포넌트내에서 줄줄이 import하는걸 깔끔히 할수있다? |
사실 저도 이부분 명확히 이해가 안되긴 했는데 (웹팩, ssr 등을 자세히 공부해야 할듯) 보기좋게 하기 위해서는 아이콘이 많아지면 홍빈님 방식이든 다른 방식으로 나누는 것도 좋아보입니다~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
@hotbreakb 이후 작업에 필요해서 먼저 머지할게요. 나중에라도 코멘트 달아주셔도 돼요~ |
Summary
add icon
Key Changes
Notes
<Icon name={"close"} color={theme.colors.primary} size={48}/>
Screenshots
Checklist
lint-fix
ts-check