mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 12:17:59 +00:00
Added a mud text list component
This commit is contained in:
3 files changed
+34
No files matched your search
@@ -0,0 +1,8 @@
|
||||
<MudList Clickable="@this.Clickable" Class="@this.Classes">
|
||||
@foreach(var item in this.Items)
|
||||
{
|
||||
<MudListItem Icon="@this.Icon" Style="display: flex; align-items: flex-start;">
|
||||
<MudText Typo="Typo.body1" Style="text-align: justify; hyphens: auto;"><b>@item.Header:</b> @item.Text</MudText>
|
||||
</MudListItem>
|
||||
}
|
||||
</MudList>
|
||||
@@ -0,0 +1,22 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace AIStudio.Components.Blocks;
|
||||
|
||||
public partial class MudTextList : ComponentBase
|
||||
{
|
||||
[Parameter]
|
||||
public bool Clickable { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public IList<TextItem> Items { get; set; } = [];
|
||||
|
||||
[Parameter]
|
||||
public string Icon { get; set; } = Icons.Material.Filled.CheckCircle;
|
||||
|
||||
[Parameter]
|
||||
public string Class { get; set; } = "";
|
||||
|
||||
private string Classes => $"mud-text-list {this.Class}";
|
||||
}
|
||||
|
||||
public readonly record struct TextItem(string Header, string Text);
|
||||
Reference in new issue
Block a user