Skip to content

Commit

Permalink
fix: svg.d.ts 추가 및 아이콘 컴포넌트 구조 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
maylh committed Jan 13, 2025
1 parent 9552e81 commit aedf443
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 23 deletions.
74 changes: 51 additions & 23 deletions src/assets/svgs/index.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,51 @@
export { default as Logo } from './logo.svg';
export { default as IcnArrowBlackLeft } from './icn_arrow_black_left.svg';
export { default as IcnArrowGrayDown } from './icn_arrow_gray_down.svg';
export { default as IcnArrowGrayRight } from './icn_arrow_gray_right.svg';
export { default as IcnArrowGrayUp } from './icn_arrow_gray_up.svg';
export { default as IcnCloseLargeGray } from './icn_close_large_gray.svg';
export { default as IcnCloseSmallGray } from './icn_close_small_gray.svg';
export { default as IcnFilter } from './icn_filter.svg';
export { default as IcnHome } from './icn_home.svg';
export { default as IcnInsta } from './icn_insta.svg';
export { default as IcnLargeHeartPink } from './icn_large_heart_pink.svg';
export { default as IcnLineArrowLargeRight } from './icn_linearrow_large_right.svg';
export { default as IcnLineArrowSmallLeft } from './icn_linearrow_small_left.svg';
export { default as IcnLineArrowSmallRight } from './icn_linearrow_small_right.svg';
export { default as IcnMyPage } from './icn_mypage.svg';
export { default as IcnO } from './icn_o.svg';
export { default as IcnPaste } from './icn_paste.svg';
export { default as IcnReset } from './icn_reset.svg';
export { default as IcnSearchLargeBlack } from './icn_search_large_black.svg';
export { default as IcnSearchMediumGray } from './icn_search_medium_gray.svg';
export { default as IcnSmallHeart } from './icn_small_heart.svg';
export { default as IcnWish } from './icn_wish.svg';
export { default as IcnX } from './icn_x.svg';
import IcnArrowBlackLeft from './icn_arrow_black_left.svg';
import IcnArrowGrayDown from './icn_arrow_gray_down.svg';
import IcnArrowGrayRight from './icn_arrow_gray_right.svg';
import IcnArrowGrayUp from './icn_arrow_gray_up.svg';
import IcnCloseLargeGray from './icn_close_large_gray.svg';
import IcnCloseSmallGray from './icn_close_small_gray.svg';
import IcnFilter from './icn_filter.svg';
import IcnHome from './icn_home.svg';
import IcnInsta from './icn_insta.svg';
import IcnLargeHeartPink from './icn_large_heart_pink.svg';
import IcnLineArrowLargeRight from './icn_linearrow_large_right.svg';
import IcnLineArrowSmallLeft from './icn_linearrow_small_left.svg';
import IcnLineArrowSmallRight from './icn_linearrow_small_right.svg';
import IcnMyPage from './icn_mypage.svg';
import IcnO from './icn_o.svg';
import IcnPaste from './icn_paste.svg';
import IcnReset from './icn_reset.svg';
import IcnSearchLargeBlack from './icn_search_large_black.svg';
import IcnSearchMediumGray from './icn_search_medium_gray.svg';
import IcnSmallHeart from './icn_small_heart.svg';
import IcnWish from './icn_wish.svg';
import IcnX from './icn_x.svg';
import Logo from './logo.svg';

const Icon = {
Logo,
IcnArrowBlackLeft,
IcnArrowGrayDown,
IcnArrowGrayRight,
IcnArrowGrayUp,
IcnCloseLargeGray,
IcnCloseSmallGray,
IcnFilter,
IcnHome,
IcnInsta,
IcnLargeHeartPink,
IcnLineArrowLargeRight,
IcnLineArrowSmallLeft,
IcnLineArrowSmallRight,
IcnMyPage,
IcnO,
IcnPaste,
IcnReset,
IcnSearchLargeBlack,
IcnSearchMediumGray,
IcnSmallHeart,
IcnWish,
IcnX,
};

export default Icon;
4 changes: 4 additions & 0 deletions src/svg.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
declare module '*.svg' {
const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>;
export default ReactComponent;
}

0 comments on commit aedf443

Please sign in to comment.