| | | 1 | | @* EntityListItem.razor - Reusable clickable list item for entity lists *@ |
| | | 2 | | @* Used for arcs, sessions, and similar entity lists *@ |
| | | 3 | | |
| | | 4 | | <MudListItem T="string" OnClick="OnClick" Class="chronicis-list-item"> |
| | | 5 | | <div class="d-flex align-center justify-space-between" style="width: 100%;"> |
| | | 6 | | <div class="d-flex align-center"> |
| | | 7 | | <MudIcon Icon="@Icon" |
| | | 8 | | Size="Size.Small" |
| | | 9 | | Class="mr-2" |
| | | 10 | | Style="color: var(--chronicis-muted-gold);" /> |
| | 13 | 11 | | <MudText>@Title</MudText> |
| | | 12 | | </div> |
| | 13 | 13 | | @if (ChildContent != null) |
| | | 14 | | { |
| | 1 | 15 | | @ChildContent |
| | | 16 | | } |
| | | 17 | | </div> |
| | | 18 | | </MudListItem> |
| | | 19 | | |
| | | 20 | | @code { |
| | | 21 | | /// <summary> |
| | | 22 | | /// The Material icon to display. |
| | | 23 | | /// </summary> |
| | | 24 | | [Parameter] |
| | 30 | 25 | | public string Icon { get; set; } = Icons.Material.Filled.Description; |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// The title/name to display. |
| | | 29 | | /// </summary> |
| | | 30 | | [Parameter] |
| | 37 | 31 | | public string Title { get; set; } = string.Empty; |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Click handler for navigation. |
| | | 35 | | /// </summary> |
| | | 36 | | [Parameter] |
| | 13 | 37 | | public EventCallback OnClick { get; set; } |
| | | 38 | | |
| | | 39 | | /// <summary> |
| | | 40 | | /// Optional content to display on the right side (e.g., a chip with count). |
| | | 41 | | /// </summary> |
| | | 42 | | [Parameter] |
| | 15 | 43 | | public RenderFragment? ChildContent { get; set; } |
| | | 44 | | } |