🐛 fix: use the right method of `useCallback

This commit is contained in:
Wahyu Kurniawan 2024-02-22 01:10:01 +07:00
parent bbb5abbd42
commit ab6bf7ffef
No known key found for this signature in database
GPG Key ID: 040A1549143A8E33

View File

@ -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>}