Lib: Assign imgclass also to image container
This commit is contained in:
@ -19,7 +19,7 @@
|
|||||||
/** Optional extra style for the lazy <div> container */
|
/** Optional extra style for the lazy <div> container */
|
||||||
containerstyle?: string;
|
containerstyle?: string;
|
||||||
|
|
||||||
/** Additional classes to insert */
|
/** Additional classes to insert for container + image */
|
||||||
imgclass?: string;
|
imgclass?: string;
|
||||||
|
|
||||||
/** Slightly zoom the image on mouse-hover */
|
/** Slightly zoom the image on mouse-hover */
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<div
|
<div
|
||||||
use:lazyload
|
use:lazyload
|
||||||
onLazyVisible={lazy_visible_handler}
|
onLazyVisible={lazy_visible_handler}
|
||||||
class="overflow-hidden"
|
class="overflow-hidden {imgclass}"
|
||||||
style="aspect-ratio: {imgwidth} / {imgheight}; max-width: {imgwidth}px; max-height: {imgheight}px; {containerstyle ??
|
style="aspect-ratio: {imgwidth} / {imgheight}; max-width: {imgwidth}px; max-height: {imgheight}px; {containerstyle ??
|
||||||
''}"
|
''}"
|
||||||
>
|
>
|
||||||
|
Reference in New Issue
Block a user