| | | 1 | | @* ChroniclsBreadcrumbs.razor - Reusable breadcrumb toolbar with optional actions *@ |
| | | 2 | | |
| | | 3 | | <div class="mud-toolbar @Class"> |
| | 27 | 4 | | @if (Items != null && Items.Any()) |
| | | 5 | | { |
| | 9 | 6 | | @if (UseCustomLinks) |
| | | 7 | | { |
| | | 8 | | <MudBreadcrumbs Items="Items"> |
| | | 9 | | <ItemTemplate Context="item"> |
| | | 10 | | <MudLink Href="@item.Href" Class="chronicis-breadcrumb-link"> |
| | 2 | 11 | | @item.Text |
| | | 12 | | </MudLink> |
| | | 13 | | </ItemTemplate> |
| | | 14 | | </MudBreadcrumbs> |
| | | 15 | | } |
| | | 16 | | else |
| | | 17 | | { |
| | | 18 | | <MudBreadcrumbs Items="Items" /> |
| | | 19 | | } |
| | | 20 | | } |
| | | 21 | | <MudSpacer /> |
| | 27 | 22 | | @ChildContent |
| | | 23 | | </div> |
| | | 24 | | |
| | | 25 | | @code { |
| | | 26 | | /// <summary> |
| | | 27 | | /// The breadcrumb items to display. |
| | | 28 | | /// </summary> |
| | | 29 | | [Parameter] |
| | 89 | 30 | | public List<BreadcrumbItem>? Items { get; set; } |
| | | 31 | | |
| | | 32 | | /// <summary> |
| | | 33 | | /// Whether to use custom MudLink styling for breadcrumb items. |
| | | 34 | | /// When false, uses default MudBreadcrumbs rendering. |
| | | 35 | | /// </summary> |
| | | 36 | | [Parameter] |
| | 11 | 37 | | public bool UseCustomLinks { get; set; } = false; |
| | | 38 | | |
| | | 39 | | /// <summary> |
| | | 40 | | /// Additional CSS classes for the toolbar container. |
| | | 41 | | /// </summary> |
| | | 42 | | [Parameter] |
| | 45 | 43 | | public string? Class { get; set; } |
| | | 44 | | |
| | | 45 | | /// <summary> |
| | | 46 | | /// Optional content to render on the right side of the toolbar (e.g., action buttons). |
| | | 47 | | /// </summary> |
| | | 48 | | [Parameter] |
| | 28 | 49 | | public RenderFragment? ChildContent { get; set; } |
| | | 50 | | } |