Class: UI::InputGroupInputComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- UI::InputGroupInputComponent
- Includes:
- InputGroupInputBehavior
- Defined in:
- app/view_components/ui/input_group_input_component.rb
Overview
InputGroupInputComponent - ViewComponent implementation
An input element styled for use within input groups. Uses InputGroupInputBehavior concern for shared styling logic.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(type: "text", placeholder: nil, value: nil, name: nil, id: nil, classes: "", **attributes) ⇒ InputGroupInputComponent
constructor
A new instance of InputGroupInputComponent.
Methods included from InputGroupInputBehavior
#input_group_input_attributes, #input_group_input_classes, #input_group_input_html_attributes
Constructor Details
#initialize(type: "text", placeholder: nil, value: nil, name: nil, id: nil, classes: "", **attributes) ⇒ InputGroupInputComponent
Returns a new instance of InputGroupInputComponent.
29 30 31 32 33 34 35 36 37 |
# File 'app/view_components/ui/input_group_input_component.rb', line 29 def initialize(type: "text", placeholder: nil, value: nil, name: nil, id: nil, classes: "", **attributes) @type = type @placeholder = placeholder @value = value @name = name @id = id @classes = classes @attributes = attributes end |
Instance Method Details
#call ⇒ Object
39 40 41 |
# File 'app/view_components/ui/input_group_input_component.rb', line 39 def call render partial: "ui/input", locals: input_group_input_attributes end |