Skip to content

Commit

Permalink
fix(icon): pass a string rather than undefined to the font awesome co…
Browse files Browse the repository at this point in the history
…mponent
  • Loading branch information
moshie committed May 17, 2024
1 parent 391bc5f commit 0aa1e82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/atoms/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ export const RoundBadge = styled.div<{ color: Colors[keyof Colors] }>`
padding: ${spacing[6]};
`;

export default function Icon({ variant, bgColor, ariaLabel, className, ...rest }: IconProps) {
export default function Icon({ variant, bgColor, ariaLabel, className = '', ...rest }: IconProps) {
const renderIcon = (className?: string) => (
<FontAwesomeIcon
{...rest}
icon={variant}
className={className}
className={className || ''}
aria-label={ariaLabel}
aria-hidden={ariaLabel ? false : true}
/>
Expand Down

0 comments on commit 0aa1e82

Please sign in to comment.