2021-12-05 23:50:48 +00:00
|
|
|
@using Microsoft.Extensions.Logging
|
|
|
|
|
|
|
|
@inject ILogger<Dialog> logger
|
|
|
|
|
|
|
|
<div class="modal @(this.Active ? "active" : "")">
|
2021-11-21 06:47:10 +00:00
|
|
|
<a class="modal-overlay" @onclick="this.OnDialogClose" aria-label="Close"></a>
|
|
|
|
<div class="modal-container">
|
|
|
|
<div class="modal-header">
|
|
|
|
<a class="btn btn-clear float-right" @onclick="this.OnClose" aria-label="Close"></a>
|
|
|
|
<div class="modal-title h5">@this.Title</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="content">
|
|
|
|
@this.ChildContent
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@code {
|
|
|
|
[Parameter]
|
|
|
|
public string Title { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
|
|
public RenderFragment ChildContent { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
|
|
public bool Active { get; set; }
|
|
|
|
[Parameter]
|
|
|
|
public EventCallback OnClose { get; set; }
|
|
|
|
|
|
|
|
public void OnDialogClose()
|
|
|
|
{
|
|
|
|
this.Active = false;
|
|
|
|
this.OnClose.InvokeAsync();
|
|
|
|
}
|
|
|
|
}
|