Skip to content

Commit

Permalink
refactor: Avatar 컴포넌트 css 대신 style 사용토록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
semnil5202 committed Aug 26, 2024
1 parent 209e612 commit 64ca8c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web-domains/src/common/components/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface AvatarProps extends Omit<ImageProps, 'src' | 'alt'> {
Icon?: React.ComponentType<{ size?: number }>;
}

export const Avatar = ({ imageUrl, alt = 'profile-image', size, Icon, ...rest }: AvatarProps) => {
export const Avatar = ({ imageUrl, alt = 'profile-image', size, Icon, style, ...rest }: AvatarProps) => {
if (!imageUrl) {
return (
<span css={{ display: 'inline-flex' }} {...rest}>
Expand All @@ -16,5 +16,5 @@ export const Avatar = ({ imageUrl, alt = 'profile-image', size, Icon, ...rest }:
);
}

return <Image src={imageUrl} alt={alt} css={{ objectFit: 'cover' }} {...rest} />;
return <Image src={imageUrl} alt={alt} style={{ ...style, objectFit: 'cover' }} {...rest} />;
};

0 comments on commit 64ca8c1

Please sign in to comment.