123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- @using FNZCM.BlazorWasm.UI.Components.FnzBootstrap.Bases
- @inherits FnzBootstrapContainerComponentBase<FnzBootstrapModal,Options>
- @code {
- [Parameter] public BackdropMode Backdrop { get => _options.Backdrop; set => _options.Backdrop = value; }
- [Parameter] public bool Keyboard { get => _options.Keyboard; set => _options.Keyboard = value; }
- [Parameter] public bool Focus { get => _options.Focus; set => _options.Focus = value; }
- [Parameter] public string CssClass { get; set; }
- [Parameter] public RenderFragment Title { get; set; }
- [Parameter] public RenderFragment Body { get; set; }
- [Parameter] public RenderFragment Footer { get; set; }
- [Parameter] public bool ShowCloseButton { get; set; } = true;
- protected override string Prefix => base.Prefix + ".modal";
- }
- <div class="modal fade" id="@ElementId">
- <div class="modal-dialog modal-dialog-centered @CssClass" @attributes="@InputAttributes">
- <div class="modal-content">
- <div class="modal-header align-items-baseline">
- <h5 class="modal-title mx-1">@Title</h5>
- @if (ShowCloseButton)
- {
- <button hidd type="button" class="btn-close" @onclick="Hide"></button>
- }
- </div>
- <div class="modal-body">
- @Body
- </div>
- <div class="modal-footer">
- @if (Footer == null)
- {
- if (ShowCloseButton)
- {
- <button class="btn btn-primary" @onclick="Hide">Close</button>
- }
- }
- else
- {
- @Footer
- }
- </div>
- </div>
- </div>
- </div>
|