ModalDialog - ModalDialogService.cs, ModalEvents.cs, ModalOptions.cs file location change
This commit is contained in:
parent
2a8aac91df
commit
a4d1f798f4
@ -1,28 +0,0 @@
|
|||||||
using Connected.Components;
|
|
||||||
using Connected.Models.Modal;
|
|
||||||
using Microsoft.AspNetCore.Components;
|
|
||||||
|
|
||||||
namespace Connected.Services.Modal;
|
|
||||||
public class ModalDialogService
|
|
||||||
{
|
|
||||||
public event Action<string, RenderFragment, List<ModalButton>, ModalOptions> OnShow;
|
|
||||||
public event Action<ModalButton?> OnClose;
|
|
||||||
|
|
||||||
public void ShowDialog(string title, RenderFragment content, List<ModalButton> buttons, ModalOptions options)
|
|
||||||
{
|
|
||||||
OnShow?.Invoke(title, content, buttons, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ShowDialog(string title, MarkupString contentMarkup, List<ModalButton> buttons, ModalOptions options)
|
|
||||||
{
|
|
||||||
var content = new RenderFragment(x => x.AddContent(1, contentMarkup));
|
|
||||||
OnShow?.Invoke(title, content, buttons, options);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Close(ModalButton? button)
|
|
||||||
{
|
|
||||||
OnClose?.Invoke(button);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
namespace Connected.Services.Modal;
|
|
||||||
public class Event
|
|
||||||
{
|
|
||||||
public Delegate Delegate;
|
|
||||||
public object[] args;
|
|
||||||
|
|
||||||
public Event(Delegate Delegate, object[] Args)
|
|
||||||
{
|
|
||||||
this.Delegate = Delegate;
|
|
||||||
this.args = Args;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
namespace Connected.Services.Modal;
|
|
||||||
public class ModalOptions
|
|
||||||
{
|
|
||||||
public bool CloseOnEscKey { get; set; } = true;
|
|
||||||
public bool DisableBackdropCLick { get; set; } = false;
|
|
||||||
public bool NoHeader { get; set; } = false;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user