30 lines
974 B
C#
30 lines
974 B
C#
using Blazorise;
|
|
using Microsoft.AspNetCore.Components;
|
|
using Seenginx.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Seenginx.Components
|
|
{
|
|
public class GeneralNotificationModalBase : ComponentBase
|
|
{
|
|
public Modal ModalReference { get; set; } = new Modal();
|
|
public NotificationSettings NotificationSettings { get; set; }
|
|
[Parameter]
|
|
public EventCallback<PopupAnswer> PopupCallback { get; set; }
|
|
|
|
public void Show(NotificationSettings notificationSettings)
|
|
{
|
|
NotificationSettings = notificationSettings;
|
|
ModalReference.Show();
|
|
}
|
|
|
|
public async Task Ok() => await PopupCallback.InvokeAsync(PopupAnswer.Ok);
|
|
public async Task Cancel() => await PopupCallback.InvokeAsync(PopupAnswer.Cancel);
|
|
public async Task Yes() => await PopupCallback.InvokeAsync(PopupAnswer.Yes);
|
|
public async Task No() => await PopupCallback.InvokeAsync(PopupAnswer.No);
|
|
}
|
|
}
|