Files
decePubClient/Components/Daisy/DataDisplay/DHoverGallery.razor
T

21 lines
711 B
Plaintext
Raw Normal View History

@inherits DComponentBase
@* daisyUI Hover gallery: https://daisyui.com/components/hover-gallery/ . Shows the first image; moving the pointer
across it shows the others. Up to 10 images of the same size, from Images or as <img> children; cap its width in
Class (max-w-60), or it fills the container. *@
<figure @attributes="AdditionalAttributes" class="@Cx("hover-gallery", Class)">
@if (Images is not null)
{
foreach (var src in Images.Take(10))
{
<img src="@src" alt="@Alt" />
}
}
@ChildContent
</figure>
@code {
[Parameter] public IEnumerable<string> Images { get; set; }
[Parameter] public string Alt { get; set; } = "";
[Parameter] public RenderFragment ChildContent { get; set; }
}