Method: Bootstrap4Helper::Accordion#header
- Defined in:
- lib/bootstrap4_helper/accordion.rb
#header(opts = {}, &block) ⇒ String
Builds a header component for the accordion, which is actually the header of a Card.
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/bootstrap4_helper/accordion.rb', line 43 def header(opts = {}, &block) @card.header(opts) do content_tag(config(:accordion_header, :h5)) do content_tag( :a, data: { toggle: 'collapse', target: "##{@target}" }, &block ) end end end |