26 lines
789 B
Plaintext
26 lines
789 B
Plaintext
<MudMessageBox @ref="_confirmDelete" Title="Attenzione!" CancelText="@NoText">
|
|
<MessageContent>
|
|
@Message
|
|
</MessageContent>
|
|
<YesButton>
|
|
<MudButton Size="Size.Small" Variant="Variant.Filled" Color="YesColor">
|
|
@YesText
|
|
</MudButton>
|
|
</YesButton>
|
|
</MudMessageBox>
|
|
|
|
@code
|
|
{
|
|
[Parameter] public string Message { get; set; } = string.Empty;
|
|
[Parameter] public string YesText { get; set; } = string.Empty;
|
|
[Parameter] public string NoText { get; set; } = "Annulla";
|
|
[Parameter] public Color YesColor { get; set; } = Color.Primary;
|
|
|
|
private MudMessageBox? _confirmDelete;
|
|
|
|
public async Task<bool?> ShowAsync()
|
|
{
|
|
if (_confirmDelete == null) return null;
|
|
return await _confirmDelete.ShowAsync();
|
|
}
|
|
} |