Class: Bootstrap4RailsComponents::Bootstrap::Components::CardHeader
- Defined in:
- lib/bootstrap4_rails_components/bootstrap/components/card_header.rb
Overview
Bootstrap Card Header getbootstrap.com/docs/4.1/components/card/#header-and-footer
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_family ⇒ Object
9 10 11 |
# File 'lib/bootstrap4_rails_components/bootstrap/components/card_header.rb', line 9 def component_family :card end |
#heading ⇒ Object
13 14 15 |
# File 'lib/bootstrap4_rails_components/bootstrap/components/card_header.rb', line 13 def heading .fetch(:heading, nil) end |
#render ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/bootstrap4_rails_components/bootstrap/components/card_header.rb', line 17 def render super do if heading.present? heading else (block_given? ? yield : body) end end end |