You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the Issues to see if this bug has already been reported
I have tested the latest version
Summary
When overwriting the component with custom image component, the dummy svg should still render if we are facing a scenario where the image url may be undefined. Right now I have to workaround it like this:
<Avatar
img={(avatarProps) => {
if (imagePreviewUrl) {
return (
<Image
alt={t('alt')}
referrerPolicy='no-referrer'
src={imagePreviewUrl}
width={144}
height={144}
{...avatarProps}
/>
)
}
// Flowbite avatar is unable to render dummy when props are passed
return <Avatar {...avatarProps} size='xl' bordered={false} />
}}
size='xl'
alt={t('alt')}
className='flex-shrink-0'
rounded
/>
Context
I want the ability to render custom component, and to maintain the ability to render the dummy, if component is null
The text was updated successfully, but these errors were encountered:
Summary
When overwriting the component with custom image component, the dummy svg should still render if we are facing a scenario where the image url may be
undefined
. Right now I have to workaround it like this:Context
I want the ability to render custom component, and to maintain the ability to render the dummy, if component is
null
The text was updated successfully, but these errors were encountered: