Class: Forms::Input::InputComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/alpha/forms/input/input_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ InputComponent

Returns a new instance of InputComponent.



6
7
8
9
10
11
12
13
14
15
16
17
# File 'app/components/alpha/forms/input/input_component.rb', line 6

def initialize(**options)
  @method = options[:method]
  @object = options[:object]
  @scope = options[:scope]
  @type = options.dig(:html, :type)
  @classes = options.dig(:html, :class)
  @floating = options.dig(:html, :floating)
  @placeholder = options.dig(:html, :placeholder)
  @onchange = options.dig(:html, :onchange)
  @html = options[:html]
  classes_builder
end