Class: UI::InputGroup
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- UI::InputGroup
- Includes:
- InputGroupBehavior
- Defined in:
- app/components/ui/input_group.rb
Overview
InputGroup - Phlex implementation
A wrapper component for grouping inputs with addons, buttons, and text. Uses InputGroupBehavior concern for shared styling logic.
Instance Method Summary collapse
-
#initialize(classes: "", **attributes) ⇒ InputGroup
constructor
A new instance of InputGroup.
- #view_template(&block) ⇒ Object
Methods included from InputGroupBehavior
#input_group_classes, #input_group_html_attributes
Constructor Details
#initialize(classes: "", **attributes) ⇒ InputGroup
Returns a new instance of InputGroup.
23 24 25 26 |
# File 'app/components/ui/input_group.rb', line 23 def initialize(classes: "", **attributes) @classes = classes @attributes = attributes end |
Instance Method Details
#view_template(&block) ⇒ Object
28 29 30 31 32 |
# File 'app/components/ui/input_group.rb', line 28 def view_template(&block) div(**input_group_html_attributes) do yield if block_given? end end |