Files
decePubClient/Components/Daisy/Navigation/DBreadcrumbItem.razor
T

23 lines
558 B
Plaintext
Raw Normal View History

@inherits DComponentBase
@* One crumb of a DBreadcrumbs: <li><a> with Href, otherwise <li><span> (the current page). class and other
attributes go on the <a>/<span>. *@
<li>
@if (Href is null)
{
<span @attributes="AdditionalAttributes" class="@Cx("inline-flex items-center gap-2", Class)">
@ChildContent
</span>
}
else
{
<a @attributes="AdditionalAttributes" href="@Href" class="@Class">
@ChildContent
</a>
}
</li>
@code {
[Parameter] public RenderFragment ChildContent { get; set; }
[Parameter] public string Href { get; set; }
}