Class: NfgUi::Bootstrap::Components::DropdownItem

Inherits:
Base
  • Object
show all
Includes:
Utilities::Activatable, Utilities::Disableable, Utilities::Remotable, Utilities::Tooltipable, Utilities::Wrappable
Defined in:
lib/nfg_ui/bootstrap/components/dropdown_item.rb

Overview

Direct Known Subclasses

Components::Elements::DropdownItem

Instance Attribute Summary

Attributes included from Utilities::Disableable

#as

Attributes included from Utilities::Wrappable

#as

Attributes inherited from Base

#body, #options, #view_context

Instance Method Summary collapse

Methods included from Utilities::Remotable

#data, #remote

Methods included from Utilities::Tooltipable

#data, #disabled_component_tooltip_wrapper_html_options, #html_options, #tooltip

Methods included from Utilities::Disableable

#disabled

Methods included from Utilities::Activatable

#active

Methods included from Utilities::Wrappable

#utility_initialize

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_familyObject



15
16
17
# File 'lib/nfg_ui/bootstrap/components/dropdown_item.rb', line 15

def component_family
  :dropdown
end

#renderObject



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
    (:span, disabled_component_tooltip_wrapper_html_options) do
      (as, html_options.except(:href)) do
        (block_given? ? yield : body)
      end
    end
  else
    (as, html_options) do
      (block_given? ? yield : body)
    end
  end
end