-
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 #71 from YAPP-Github/feature/FE-052
feature/FE-052 : IconButton disabled 에러 수정
- Loading branch information
Showing
6 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
import { SVGProps } from 'react'; | ||
|
||
interface Props extends SVGProps<SVGSVGElement> { | ||
/** icon id (spriteIcons 폴더하에 있는 svg 파일명과 동일함) */ | ||
id: string; | ||
/** icon id (spriteIcons 폴더하에 있는 svg 파일명과 동일함) */ | ||
id: string; | ||
} | ||
|
||
const SvgIcon = ({ id, width = 16, height = 16, fill = 'none', ...rest }: Props) => { | ||
return ( | ||
<svg width={width} height={height} fill={fill} {...rest}> | ||
<use href={`/sprite.svg#${id}`} /> | ||
</svg> | ||
); | ||
return ( | ||
<svg width={width} height={height} fill={fill} {...rest}> | ||
<use href={`/sprite.svg#${id}`} /> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default SvgIcon; |