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

24 lines
842 B
Plaintext
Raw Normal View History

@inherits DComponentBase
@* daisyUI Hover 3D: https://daisyui.com/components/hover-3d/ . ChildContent must be one non-interactive element (a
<figure>, a card); the eight empty divs after it are the hover zones that tilt it. With Href the whole thing is a
link, the only way to make it clickable. *@
@if (Href is null)
{
<div @attributes="AdditionalAttributes" class="@Cx("hover-3d", Class)">
@ChildContent
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
</div>
}
else
{
<a @attributes="AdditionalAttributes" href="@Href" class="@Cx("hover-3d", Class)">
@ChildContent
<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>
</a>
}
@code {
[Parameter] public RenderFragment ChildContent { get; set; }
[Parameter] public string Href { get; set; }
}