feaaf76f46
Move some of the shared components
37 lines
1.0 KiB
Plaintext
37 lines
1.0 KiB
Plaintext
<MudButtonGroup Size="Size.Small">
|
|
@if (DetailsHref != null)
|
|
{
|
|
<MudTooltip Text="Details">
|
|
<MudIconButton Href="@DetailsHref" Icon="@Icons.Material.Filled.Description">Details</MudIconButton>
|
|
</MudTooltip>
|
|
}
|
|
@if (EditHref != null)
|
|
{
|
|
<MudTooltip Text="Edit">
|
|
<MudIconButton Href="@EditHref" Icon="@Icons.Material.Filled.Edit">Edit</MudIconButton>
|
|
</MudTooltip>
|
|
}
|
|
@if (DeleteOnClick != null)
|
|
{
|
|
<MudTooltip Text="Delete">
|
|
<MudIconButton Icon="@Icons.Material.Outlined.Delete"
|
|
Color="Color.Error"
|
|
OnClick="HandleDeleteClick"/>
|
|
</MudTooltip>
|
|
}
|
|
</MudButtonGroup>
|
|
|
|
@code {
|
|
|
|
[Parameter] public string? DetailsHref { get; set; }
|
|
[Parameter] public string? EditHref { get; set; }
|
|
[Parameter] public Func<Task>? DeleteOnClick { get; set; }
|
|
|
|
private async Task HandleDeleteClick()
|
|
{
|
|
if (DeleteOnClick != null)
|
|
{
|
|
await DeleteOnClick();
|
|
}
|
|
}
|
|
} |