1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <div class="modal" tabindex="-1" role="dialog" style="display:none" id="@elementid">
- <div class="modal-container">
- <div class="modal__body">
- <div class="modal__body__header">
- <div class="modal__body__header__info">
- <img src="img/user.svg" alt="">
- <p>@Title</p>
- </div>
- </div>
- <div class="modal__body__container modal__body__container_noflex">
- <div class="modal__404__text__box">
- @Body
- <p class="modal__404__text">
- @((MarkupString)message)
- </p>
- </div>
- </div>
- </div>
- <a class="modal_close" style="cursor:pointer" @onclick="@Close">✖</a>
- </div>
- </div>
- @code {
- [Inject]
- public IJSRuntime JsRuntime { get; set; }
- [Parameter]
- public RenderFragment Title { get; set; }
- [Parameter]
- public RenderFragment Body { get; set; }
- private string message = "";
- private string elementid = "modal_info";
- public void Open(string message = "")
- {
- this.message = message;
- JsRuntime.InvokeVoidAsync("OpenModal", elementid);
- }
- public void Close()
- {
- JsRuntime.InvokeVoidAsync("CloseModal", elementid);
- }
- }
|