Extracted some pages to their own assembly and finished the artifact display page code

This commit is contained in:
Vincent Allen
2025-10-08 13:08:12 -04:00
parent fd0e6290fe
commit 02c2660b09
626 changed files with 39989 additions and 1553 deletions

View File

@@ -5,9 +5,17 @@
@* Loop through and display each item as a chip *@
@foreach (var item in Items)
{
<MudChip Color="Color.Primary" OnClose="() => RemoveItem(item)" T="T">
@DisplayFunc(item)
</MudChip>
@if (DeleteEnabled)
{
<MudChip Color="Color.Primary" OnClose="() => RemoveItem(item)" T="T">
@DisplayFunc(item)
</MudChip>
} else
{
<MudChip Color="Color.Primary" T="T">
@DisplayFunc(item)
</MudChip>
}
}
@* Render the input control provided by the consumer *@
@@ -22,6 +30,9 @@
</div>
@code {
[Parameter]
public bool DeleteEnabled { get; set; } = true;
/// <summary>
/// The list of items to display and manage.
/// </summary>
@@ -51,8 +62,6 @@
[Parameter]
public Func<T, string> DisplayFunc { get; set; } = item => item?.ToString() ?? string.Empty;
/// <summary>
/// A public method that the consumer's input control can call to add a new item.
/// </summary>