2024-07-11 11:03:07 +00:00
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
|
|
|
namespace AIStudio.Components.CommonDialogs;
|
|
|
|
|
2024-07-11 19:33:12 +00:00
|
|
|
public partial class SingleInputDialog : ComponentBase
|
2024-07-11 11:03:07 +00:00
|
|
|
{
|
|
|
|
[CascadingParameter]
|
|
|
|
private MudDialogInstance MudDialog { get; set; } = null!;
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
public string Message { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
public string UserInput { get; set; } = string.Empty;
|
2024-07-11 19:33:12 +00:00
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
public string ConfirmText { get; set; } = "OK";
|
2024-07-11 11:03:07 +00:00
|
|
|
|
|
|
|
private void Cancel() => this.MudDialog.Cancel();
|
|
|
|
|
|
|
|
private void Confirm() => this.MudDialog.Close(DialogResult.Ok(this.UserInput));
|
|
|
|
}
|