Skip to content

Commit

Permalink
chore: svg 누락 props 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
HiimKwak committed Nov 19, 2023
1 parent 9e4694b commit fe7f87c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/components/common/Icon/index.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
import { ComponentProps } from 'react';

import { $ } from '@/utils/core';

import { IconName } from './icon.type';
import { iconMap } from './IconMap';

interface IconProps extends ComponentProps<'svg'> {
iconName: IconName;
}

export const Icon = ({ iconName, ...props }: IconProps) => {
export const Icon = ({
iconName,
width = 24,
height = 24,
className,
...props
}: IconProps) => {
const path = iconMap[iconName];
return (
<svg
width={width}
height={height}
fillRule="evenodd"
clipRule="evenodd"
xmlns="http://www.w3.org/2000/svg"
className={$(className)}
{...props}
>
<path d={path} />
Expand Down

0 comments on commit fe7f87c

Please sign in to comment.