@namespace Oqtane.Modules.Controls @inherits ModuleBase @if (visible) {
} @code { [Parameter] public string Header { get; set; } [Parameter] public string Message { get; set; } [Parameter] public string Action { get; set; } [Parameter] public string Class { get; set; } [Parameter] public Action OnClick { get; set; } bool visible = false; protected override void OnParametersSet() { if (string.IsNullOrEmpty(Action)) { Action = "Ok"; } if (string.IsNullOrEmpty(Class)) { Class = "btn btn-success"; } } private void DisplayModal() { visible = !visible; StateHasChanged(); } private void Confirm() { DisplayModal(); OnClick(); } }