Class: NfgUi::Bootstrap::Components::Button
- Includes:
- Utilities::Activatable, Utilities::CollapseToggleable, Utilities::Disableable, Utilities::Modalable, Utilities::Remotable, Utilities::Sizable, Utilities::Themeable, Utilities::Tooltipable, Utilities::Wrappable
- Defined in:
- lib/nfg_ui/bootstrap/components/button.rb
Overview
Bootstrap Button Component getbootstrap.com/docs/4.1/components/buttons/
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Utilities::Wrappable
Attributes included from Utilities::Disableable
Attributes inherited from Base
#body, #options, #view_context
Instance Method Summary collapse
Methods included from Utilities::Wrappable
Methods included from Utilities::Tooltipable
#data, #disabled_component_tooltip_wrapper_html_options, #html_options, #tooltip
Methods included from Utilities::Disableable
Methods included from Utilities::Themeable
Methods included from Utilities::Modalable
Methods included from Utilities::Sizable
Methods included from Utilities::Remotable
Methods included from Utilities::CollapseToggleable
Methods included from Utilities::Collapsible
#collapse, #collapsed, #collapsible
Methods included from Utilities::Activatable
Methods inherited from Base
#component_family, #data, #html_options, #id, #initialize, #style
Constructor Details
This class inherits a constructor from NfgUi::Bootstrap::Components::Base
Instance Method Details
#block ⇒ Object
33 34 35 |
# File 'lib/nfg_ui/bootstrap/components/button.rb', line 33 def block .fetch(:block, false) end |
#href ⇒ Object
37 38 39 40 |
# File 'lib/nfg_ui/bootstrap/components/button.rb', line 37 def href return if as != :a collapse || super || '#' end |
#remove_component_css_classes ⇒ Object
42 43 44 |
# File 'lib/nfg_ui/bootstrap/components/button.rb', line 42 def remove_component_css_classes .fetch(:remove_component_css_classes, false) end |
#render ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/nfg_ui/bootstrap/components/button.rb', line 19 def render if tooltip && disabled content_tag(:span, ) do content_tag(as, ) do (block_given? ? yield : body) end end else content_tag(as, ) do (block_given? ? yield : body) end end end |