Skip to content

Commit

Permalink
fix(AlertIcon): icon prop is an object type in v2
Browse files Browse the repository at this point in the history
  • Loading branch information
trend-gino-wu-2 committed Dec 5, 2024
1 parent d797c22 commit ea067ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/alert/AlertIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ const AlertIcon = forwardRef((inProps, ref) => {
const styleProps = useAlertIconStyle({ variant, severity });

const icon = useMemo(() => {
if (typeof iconProp === 'string') {
if (typeof iconProp === 'object') {
return (
<Icon icon={iconProp} />
<Icon as={iconProp} />
);
}
if (iconProp === undefined) {
Expand Down

0 comments on commit ea067ba

Please sign in to comment.