Class: NfgUi::Bootstrap::Components::DropdownItem
- Includes:
- Utilities::Activatable, Utilities::Disableable, Utilities::Remotable, Utilities::Tooltipable, Utilities::Wrappable
- Defined in:
- lib/nfg_ui/bootstrap/components/dropdown_item.rb
Overview
Bootstrap Dropdown Items Component getbootstrap.com/docs/4.1/components/dropdowns/#menu-items
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::Remotable
Methods included from Utilities::Tooltipable
#data, #disabled_component_tooltip_wrapper_html_options, #html_options, #tooltip
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
#component_family ⇒ Object
15 16 17 |
# File 'lib/nfg_ui/bootstrap/components/dropdown_item.rb', line 15 def component_family :dropdown end |
#render ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/nfg_ui/bootstrap/components/dropdown_item.rb', line 19 def render if tooltip && disabled content_tag(:span, ) do content_tag(as, .except(:href)) do (block_given? ? yield : body) end end else content_tag(as, ) do (block_given? ? yield : body) end end end |