Skip to content

Commit

Permalink
Merge pull request #18 from depromeet/feat/icon
Browse files Browse the repository at this point in the history
Icon Component 생성
  • Loading branch information
sumi-0011 authored Dec 7, 2023
2 parents 39117d3 + c557e7e commit b9723f6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/components/Icon/LeftArrowIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React, { type SVGProps } from 'react';

function LeftArrowIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
d="M13.7139 17.4273L6.43555 10.149L13.7139 2.87012"
stroke={props.color ?? '#B0B8C1'}
strokeWidth="1.66667"
/>
</svg>
);
}

export default LeftArrowIcon;
15 changes: 15 additions & 0 deletions src/components/Icon/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { type SVGProps } from 'react';
import LeftArrowIcon from '@/components/Icon/LeftArrowIcon';

type IconType = 'left-arrow';

interface Props extends SVGProps<SVGSVGElement> {
name: IconType;
}

export default function Icon({ name, ...props }: Props) {
switch (name) {
case 'left-arrow':
return <LeftArrowIcon {...props} />;
}
}

0 comments on commit b9723f6

Please sign in to comment.