.modal

= yield :wrapper
.modal-dialog{ class: "modal-#{size}" }
  .modal-content
    .modal-header
      %button.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"}
        - if respond_to?(:fa_icon)
          = fa_icon('times')
        - else
          = fas_icon('times')
      = yield :header
      - if title.present?
        %h4.modal-title= title

    = yield
    = yield :before_body
    - body_html = capture { yield :body }
    - if body_html.present?
      .modal-body= body_html
    = yield :after_body

    - footer_html = capture { yield :footer }
    - if footer_html.present?
      .modal-footer= footer_html