-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from depromeet/feat/icon
Icon Component 생성
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} />; | ||
} | ||
} |