mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 23:49:06 +00:00
25 lines
678 B
C#
25 lines
678 B
C#
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace AIStudio.Components.CommonDialogs;
|
|
|
|
public partial class SingleInputDialog : ComponentBase
|
|
{
|
|
[CascadingParameter]
|
|
private MudDialogInstance MudDialog { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public string Message { get; set; } = string.Empty;
|
|
|
|
[Parameter]
|
|
public string UserInput { get; set; } = string.Empty;
|
|
|
|
[Parameter]
|
|
public string ConfirmText { get; set; } = "OK";
|
|
|
|
[Parameter]
|
|
public Color ConfirmColor { get; set; } = Color.Error;
|
|
|
|
private void Cancel() => this.MudDialog.Cancel();
|
|
|
|
private void Confirm() => this.MudDialog.Close(DialogResult.Ok(this.UserInput));
|
|
} |