You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Components/Components/Breadcrumbs/Breadcrumbs.razor

35 lines
1.1 KiB

@namespace Connected.Components
@inherits UIComponent
@if (Items is null || !Items.Any())
{
return;
}
<CascadingValue Value="this" IsFixed="true">
<ul @attributes="UserAttributes" class=@Classname style="@Style">
@if (MaxItems is not null && Collapsed && Items.Count > MaxItems)
{
<BreadcrumbLink Item="Items[0]"></BreadcrumbLink>
<BreadcrumbSeparator></BreadcrumbSeparator>
<li class="mud-breadcrumbs-expander" @onclick="Expand">
<Icon Icon="@ExpanderIcon" Size="Size.Small"></Icon>
</li>
<BreadcrumbSeparator></BreadcrumbSeparator>
<BreadcrumbLink Item="Items[Items.Count - 1]"></BreadcrumbLink>
}
else
{
@for (var i = 0; i < Items.Count; i++)
{
var item = Items[i];
<BreadcrumbLink Item="item"></BreadcrumbLink>
if (i != Items.Count - 1)
{
<BreadcrumbSeparator></BreadcrumbSeparator>
}
}
}
</ul>
</CascadingValue>