mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 13:03:12 +00:00
48 lines
1.3 KiB
Text
48 lines
1.3 KiB
Text
|
|
<div class="modal @modalClass" tabindex="-1" role="dialog" style="display:@modalDisplay; overflow-y: auto;">
|
||
|
|
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||
|
|
<div class="modal-content mt-4">
|
||
|
|
<div class="modal-header">
|
||
|
|
<h5 class="modal-title">@Title</h5>
|
||
|
|
@* <button type="button" data-dismiss="modal" aria-label="Close" @onclick="Close"> X
|
||
|
|
</button> *@
|
||
|
|
<a href="javascript:void(0);" class="cursor-pointer text-dark" data-dismiss="modal" aria-label="Close" @onclick="Close">
|
||
|
|
X
|
||
|
|
</a>
|
||
|
|
</div>
|
||
|
|
<div class="modal-body">
|
||
|
|
@ChildContent
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
@if (showBackdrop)
|
||
|
|
{
|
||
|
|
<div class="modal-backdrop fade show"></div>
|
||
|
|
}
|
||
|
|
|
||
|
|
@code {
|
||
|
|
[Parameter]
|
||
|
|
public string? Title { get; set; }
|
||
|
|
[Parameter]
|
||
|
|
public RenderFragment? ChildContent { get; set; }
|
||
|
|
|
||
|
|
private string modalDisplay = "none;";
|
||
|
|
private string modalClass = string.Empty;
|
||
|
|
private bool showBackdrop = false;
|
||
|
|
|
||
|
|
public void Open()
|
||
|
|
{
|
||
|
|
modalDisplay = "block";
|
||
|
|
modalClass = "show";
|
||
|
|
showBackdrop = true;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void Close()
|
||
|
|
{
|
||
|
|
modalDisplay = "none";
|
||
|
|
modalClass = string.Empty;
|
||
|
|
showBackdrop = false;
|
||
|
|
}
|
||
|
|
}
|