🐛 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(() => {
|
const renderIcon = useCallback(() => {
|
||||||
if (!icon) return <InfoSquareIcon className={iconClass()} />;
|
if (!icon) return <InfoSquareIcon className={iconClass()} />;
|
||||||
return cloneIcon(icon, { className: iconClass() });
|
return cloneIcon(icon, { className: iconClass() });
|
||||||
}, [icon])();
|
}, [icon]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div {...props} className={wrapper({ className })}>
|
<div {...props} className={wrapper({ className })}>
|
||||||
{renderIcon}
|
{renderIcon()}
|
||||||
<div className={content()}>
|
<div className={content()}>
|
||||||
<p className={titleClass()}>{title}</p>
|
<p className={titleClass()}>{title}</p>
|
||||||
{description && <p className={descriptionClass()}>{description}</p>}
|
{description && <p className={descriptionClass()}>{description}</p>}
|
||||||
|
Loading…
Reference in New Issue
Block a user