mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
create custom re-usable image
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
export function BsmImage({className, image, errorImage, loading}: {className?: string, image: string, errorImage?: string, loading?: "lazy"|"eager"}) {
|
||||
|
||||
return (
|
||||
<img className={className} src={image} loading={loading} onError={({currentTarget}) => { currentTarget.onerror = null; currentTarget.src = errorImage ? errorImage : "" }}/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user