🐛 fix: use the right method of `useCallback
This commit is contained in:
parent
bbb5abbd42
commit
ab6bf7ffef
@ -54,11 +54,11 @@ export const InlineNotification = ({
|
||||
const renderIcon = useCallback(() => {
|
||||
if (!icon) return <InfoSquareIcon className={iconClass()} />;
|
||||
return cloneIcon(icon, { className: iconClass() });
|
||||
}, [icon])();
|
||||
}, [icon]);
|
||||
|
||||
return (
|
||||
<div {...props} className={wrapper({ className })}>
|
||||
{renderIcon}
|
||||
{renderIcon()}
|
||||
<div className={content()}>
|
||||
<p className={titleClass()}>{title}</p>
|
||||
{description && <p className={descriptionClass()}>{description}</p>}
|
||||
|
Loading…
Reference in New Issue
Block a user