Files
AI-Studio/app/MindWork AI Studio/Dialogs/ConfirmDialog.razor.cs
T

27 lines
754 B
C#
Raw Normal View History

2025-04-27 16:13:15 +02:00
using AIStudio.Components;
2024-04-20 17:07:27 +02:00
using Microsoft.AspNetCore.Components;
2024-08-21 08:30:01 +02:00
namespace AIStudio.Dialogs;
2024-04-20 17:07:27 +02:00
2024-05-04 10:55:00 +02:00
/// <summary>
/// A confirmation dialog that can be used to ask the user for confirmation.
/// </summary>
2025-04-27 16:13:15 +02:00
public partial class ConfirmDialog : MSGComponentBase
2024-04-20 17:07:27 +02:00
{
[CascadingParameter]
2025-03-12 19:12:56 +01:00
private IMudDialogInstance MudDialog { get; set; } = null!;
2024-04-20 17:07:27 +02:00
[Parameter]
public string Message { get; set; } = string.Empty;
/// <summary>
/// Optional Markdown content rendered instead of using the message property.
/// </summary>
[Parameter]
public string MarkdownBody { get; set; } = string.Empty;
2024-04-20 17:07:27 +02:00
private void Cancel() => this.MudDialog.Cancel();
private void Confirm() => this.MudDialog.Close(DialogResult.Ok(true));
}