Added component for all assistant blocks

This commit is contained in:
Thorsten Sommer 2024-07-14 15:14:27 +02:00
parent 17514752d8
commit 7751e61a01
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,26 @@
<MudItem xs="3">
<MudCard Outlined="@true" Style="border-width: 2px; border-color: #0d47a1; border-radius: 12px; border-style: solid;">
<MudCardHeader>
<CardHeaderContent>
<MudStack AlignItems="AlignItems.Center" Row="@true">
<MudIcon Icon="@this.Icon" Size="Size.Large" Color="Color.Primary"/>
<MudText Typo="Typo.h6">
@this.Name
</MudText>
</MudStack>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudStack>
<MudText>
@this.Description
</MudText>
</MudStack>
</MudCardContent>
<MudCardActions>
<MudButton Size="Size.Large" Variant="Variant.Filled" StartIcon="@this.Icon" Color="Color.Default" Href="@this.Link">
@this.ButtonText
</MudButton>
</MudCardActions>
</MudCard>
</MudItem>

View File

@ -0,0 +1,21 @@
using Microsoft.AspNetCore.Components;
namespace AIStudio.Components.Blocks;
public partial class AssistantBlock : ComponentBase
{
[Parameter]
public string Name { get; set; } = string.Empty;
[Parameter]
public string Description { get; set; } = string.Empty;
[Parameter]
public string Icon { get; set; } = Icons.Material.Filled.DisabledByDefault;
[Parameter]
public string ButtonText { get; set; } = "Start";
[Parameter]
public string Link { get; set; } = string.Empty;
}