Class: Ui::Input::Component

Inherits:
BaseComponent
  • Object
show all
Defined in:
lib/uikit_rails/templates/components/input/component.rb

Overview

Text input field with consistent styling.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**html_attrs) ⇒ Component

Returns a new instance of Component.



9
10
11
12
# File 'lib/uikit_rails/templates/components/input/component.rb', line 9

def initialize(**html_attrs)
  @html_attrs = html_attrs
  super()
end

Instance Attribute Details

#html_attrsObject (readonly)

Returns the value of attribute html_attrs.



7
8
9
# File 'lib/uikit_rails/templates/components/input/component.rb', line 7

def html_attrs
  @html_attrs
end

Instance Method Details

#callObject



14
15
16
# File 'lib/uikit_rails/templates/components/input/component.rb', line 14

def call
  tag.input(**computed_attrs)
end