@namespace QuantEngine.Web.Client.Components @inject IDialogService DialogService @code { public static async Task Show(IDialogService dialogService, string title, string message, string confirmText = "확인", string cancelText = "취소") { var options = new DialogOptions { CloseButton = false, MaxWidth = MaxWidth.Small, FullWidth = true, BackdropClick = false }; var parameters = new DialogParameters { { x => x.Title, title }, { x => x.Message, message }, { x => x.ConfirmText, confirmText }, { x => x.CancelText, cancelText } }; var dialog = await dialogService.ShowAsync(title, parameters, options); var result = await dialog.Result; return !result.Canceled && (bool?)result.Data == true; } } @Title @Message @CancelText @ConfirmText @code { [CascadingParameter] private IMudDialogInstance MudDialog { get; set; } [Parameter] public string Title { get; set; } = "확인"; [Parameter] public string Message { get; set; } = ""; [Parameter] public string ConfirmText { get; set; } = "확인"; [Parameter] public string CancelText { get; set; } = "취소"; private void Confirm() => MudDialog.Close(DialogResult.Ok(true)); private void Cancel() => MudDialog.Cancel(); }