Class: NfgUi::Bootstrap::Components::ListGroupItem
- Includes:
- Utilities::Activatable, Utilities::Disableable, Utilities::Themeable, Utilities::Wrappable
- Defined in:
- lib/nfg_ui/bootstrap/components/list_group_item.rb
Overview
Bootstrap List Group Item Component getbootstrap.com/docs/4.1/components/list-group/
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Utilities::Disableable
Attributes included from Utilities::Wrappable
Attributes inherited from Base
#body, #options, #view_context
Instance Method Summary collapse
Methods included from Utilities::Themeable
Methods included from Utilities::Disableable
Methods included from Utilities::Activatable
Methods included from Utilities::Wrappable
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
#action ⇒ Object
18 19 20 |
# File 'lib/nfg_ui/bootstrap/components/list_group_item.rb', line 18 def action .fetch(:action, false) end |
#badge ⇒ Object
22 23 24 |
# File 'lib/nfg_ui/bootstrap/components/list_group_item.rb', line 22 def badge .fetch(:badge, nil) end |
#component_family ⇒ Object
14 15 16 |
# File 'lib/nfg_ui/bootstrap/components/list_group_item.rb', line 14 def component_family :list_group end |
#render ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/nfg_ui/bootstrap/components/list_group_item.rb', line 26 def render super do capture do concat(block_given? ? yield : body) if badge concat(NfgUi::Bootstrap::Components::Badge.new({ pill: true, theme: (theme || NfgUi::DEFAULT_BOOTSTRAP_THEME), body: badge }, view_context).render) end end end end |