Class: NfgUi::Components::Patterns::Collapse
- Inherits:
-
Bootstrap::Components::Collapse
- Object
- Bootstrap::Components::Base
- Bootstrap::Components::Collapse
- NfgUi::Components::Patterns::Collapse
- Includes:
- Bootstrap::Utilities::Headable, Traits::Collapse, Utilities::Describable, Utilities::Renderable, Utilities::Traitable
- Defined in:
- lib/nfg_ui/components/patterns/collapse.rb
Overview
Button Group doesn’t have any customizations unique to the design system yet As such, the NFG UI button group is simply a bootstrap button group behind the scenes. Traits will eventually be connected here.
Constant Summary
Constants included from Traits::Collapse
Constants included from Traits
Traits::REGISTERED_TRAITS, Traits::TRAIT_MODULES
Instance Attribute Summary
Attributes inherited from Bootstrap::Components::Base
#body, #options, #view_context
Instance Method Summary collapse
Methods included from Traits::Collapse
#collapsed_trait, #collapsible_trait, #navbar_trait
Methods included from Utilities::Renderable
Methods included from Utilities::Describable
Methods included from Utilities::Traitable
Methods included from Bootstrap::Utilities::Headable
Methods inherited from Bootstrap::Components::Collapse
Methods included from Bootstrap::Utilities::Collapsible
#collapse, #collapsed, #collapsible
Methods inherited from Bootstrap::Components::Base
#component_family, #data, #href, #html_options, #id, #initialize, #style
Constructor Details
This class inherits a constructor from NfgUi::Bootstrap::Components::Base
Instance Method Details
#render ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/nfg_ui/components/patterns/collapse.rb', line 18 def render capture do if heading opts = { collapse: "##{id}", body: heading, icon: 'caret-down', class: 'pl-0 text-left' } opts.merge!(traits: [:link, :block]) concat(NfgUi::Components::Elements::Button.new(opts, view_context).render) end concat(super) end end |