Class: UI::SelectLabelComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::SelectLabelComponent
- Includes:
- SelectLabelBehavior
- Defined in:
- app/view_components/ui/select_label_component.rb
Overview
LabelComponent - ViewComponent implementation
Label for a group of select items.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ SelectLabelComponent
constructor
A new instance of SelectLabelComponent.
Methods included from SelectLabelBehavior
#select_label_classes, #select_label_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ SelectLabelComponent
Returns a new instance of SelectLabelComponent.
14 15 16 17 |
# File 'app/view_components/ui/select_label_component.rb', line 14 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
19 20 21 |
# File 'app/view_components/ui/select_label_component.rb', line 19 def call content_tag :div, content, **select_label_html_attributes.deep_merge(@attributes) end |