2024-04-20 15:07:27 +00:00
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
2024-08-21 06:30:01 +00:00
|
|
|
namespace AIStudio.Dialogs;
|
2024-04-20 15:07:27 +00:00
|
|
|
|
2024-05-04 08:55:00 +00:00
|
|
|
/// <summary>
|
|
|
|
/// A confirmation dialog that can be used to ask the user for confirmation.
|
|
|
|
/// </summary>
|
2024-04-20 15:07:27 +00:00
|
|
|
public partial class ConfirmDialog : ComponentBase
|
|
|
|
{
|
|
|
|
[CascadingParameter]
|
|
|
|
private MudDialogInstance MudDialog { get; set; } = null!;
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
public string Message { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
private void Cancel() => this.MudDialog.Cancel();
|
|
|
|
|
|
|
|
private void Confirm() => this.MudDialog.Close(DialogResult.Ok(true));
|
|
|
|
}
|