Class: Bootstrap4RailsComponents::Bootstrap::Components::DropdownHeader

Inherits:
Base
  • Object
show all
Defined in:
lib/bootstrap4_rails_components/bootstrap/components/dropdown_header.rb

Overview

Bootstrap Dropdown Header Component getbootstrap.com/docs/4.1/components/dropdowns/#headers

Instance Attribute Summary

Attributes inherited from Base

#body, #options, #view_context

Instance Method Summary collapse

Methods inherited from Base

#component_initialize, #data, #href, #html_options, #id, #initialize, #style, #utility_initialize

Constructor Details

This class inherits a constructor from Bootstrap4RailsComponents::Bootstrap::Components::Base

Instance Method Details

#component_familyObject



13
14
15
# File 'lib/bootstrap4_rails_components/bootstrap/components/dropdown_header.rb', line 13

def component_family
  :dropdown
end

#headingObject



9
10
11
# File 'lib/bootstrap4_rails_components/bootstrap/components/dropdown_header.rb', line 9

def heading
  options.fetch(:heading, '')
end

#renderObject



17
18
19
# File 'lib/bootstrap4_rails_components/bootstrap/components/dropdown_header.rb', line 17

def render
  (:h6, heading, html_options)
end