Class: NfgUi::Bootstrap::Components::NavbarToggler
- Includes:
- Utilities::CollapseToggleable
- Defined in:
- lib/nfg_ui/bootstrap/components/navbar_toggler.rb
Overview
Bootstrap Navbar Component getbootstrap.com/docs/4.1/components/navbar/
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
#body, #options, #view_context
Instance Method Summary collapse
-
#component_family ⇒ Object
Pass through to collapse component def collapse options.fetch(:collapse, nil) end.
- #render ⇒ Object
Methods included from Utilities::CollapseToggleable
Methods included from Utilities::Collapsible
#collapse, #collapsed, #collapsible
Methods inherited from Base
#data, #href, #html_options, #id, #initialize, #style
Constructor Details
This class inherits a constructor from NfgUi::Bootstrap::Components::Base
Instance Method Details
#component_family ⇒ Object
Pass through to collapse component def collapse
.fetch(:collapse, nil)
end
16 17 18 |
# File 'lib/nfg_ui/bootstrap/components/navbar_toggler.rb', line 16 def component_family :navbar end |
#render ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/nfg_ui/bootstrap/components/navbar_toggler.rb', line 20 def render super do if body (block_given? ? yield : body) else content_tag(:span, nil, class: 'navbar-toggler-icon') end end end |