Class: Bs5::ButtonToolbarComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Bs5::ButtonToolbarComponent
- Defined in:
- app/components/bs5/button_toolbar_component.rb
Instance Method Summary collapse
- #component_attributes ⇒ Object
-
#initialize(options = {}) ⇒ ButtonToolbarComponent
constructor
A new instance of ButtonToolbarComponent.
- #render? ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ ButtonToolbarComponent
Returns a new instance of ButtonToolbarComponent.
5 6 7 |
# File 'app/components/bs5/button_toolbar_component.rb', line 5 def initialize( = {}) @options = end |
Instance Method Details
#component_attributes ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/components/bs5/button_toolbar_component.rb', line 13 def component_attributes = { role: 'toolbar' } @options[:class] = Array(@options[:class]) @options[:class] << 'btn-toolbar' @options.merge() end |
#render? ⇒ Boolean
9 10 11 |
# File 'app/components/bs5/button_toolbar_component.rb', line 9 def render? content.present? end |