@using MudBlazor
Confirm Delete
Are you sure you want to delete @ContentText? This action cannot be undone.
Cancel @if (_isDeleting) { Deleting... } else { Yes, Delete It }
@code { [CascadingParameter] IMudDialogInstance MudDialog { get; set; } = default!; [Parameter] public string ContentText { get; set; } = string.Empty; private bool _isDeleting = false; private async Task HandleSubmit() { _isDeleting = true; StateHasChanged(); await Task.Delay(1000); MudDialog.Close(DialogResult.Ok(true)); } private void Cancel() => MudDialog.Cancel(); }