24 lines
842 B
Plaintext
24 lines
842 B
Plaintext
@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; }
|
||
|
|
}
|