mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
7 lines
347 B
TypeScript
7 lines
347 B
TypeScript
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 : "" }}/>
|
|
)
|
|
}
|