Class: UI::InputGroupComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::InputGroupComponent
- Includes:
- InputGroupBehavior
- Defined in:
- app/view_components/ui/input_group_component.rb
Overview
InputGroupComponent - ViewComponent implementation
A wrapper component for grouping inputs with addons, buttons, and text. Uses InputGroupBehavior concern for shared styling logic.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(classes: "", **attributes) ⇒ InputGroupComponent
constructor
A new instance of InputGroupComponent.
Methods included from InputGroupBehavior
#input_group_classes, #input_group_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ InputGroupComponent
Returns a new instance of InputGroupComponent.
25 26 27 28 |
# File 'app/view_components/ui/input_group_component.rb', line 25 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
30 31 32 33 34 |
# File 'app/view_components/ui/input_group_component.rb', line 30 def call content_tag :div, **input_group_html_attributes do content end end |