class Bootstrap4RailsComponents::Bootstrap::Components::ModalHeader

Bootstrap Modal Component getbootstrap.com/docs/4.1/components/modal/

Public Instance Methods

component_family() click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/modal_header.rb, line 10
def component_family
  :modal
end
render() click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/modal_header.rb, line 18
def render
  super do
    capture do
      concat(content_tag(:h5, title, class: 'modal-title')) if title
      concat(Bootstrap4RailsComponents::Bootstrap::Components::Button.new({ as: :button, class: 'close', theme: nil, data: { dismiss: 'modal' }, aria: { label: 'Close' } }, view_context).render {
        content_tag(:span, "×".html_safe, { aria: { hidden: 'true' } })
      })
    end
  end
end
title() click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/modal_header.rb, line 14
def title
  options.fetch(:title, nil)
end

Private Instance Methods

non_html_attribute_options() click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/components/modal_header.rb, line 31
def non_html_attribute_options
  super.push(:title)
end