Class: Maglev::Uikit::Form::IconFieldComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Maglev::Uikit::Form::IconFieldComponent
- Defined in:
- app/components/maglev/uikit/form/icon_field_component.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#search_path ⇒ Object
readonly
Returns the value of attribute search_path.
Instance Method Summary collapse
- #dom_id ⇒ Object
- #error ⇒ Object
-
#initialize(name:, search_path:, options:) ⇒ IconFieldComponent
constructor
A new instance of IconFieldComponent.
- #label ⇒ Object
- #value ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(name:, search_path:, options:) ⇒ IconFieldComponent
Returns a new instance of IconFieldComponent.
9 10 11 12 13 |
# File 'app/components/maglev/uikit/form/icon_field_component.rb', line 9 def initialize(name:, search_path:, options:) @name = name @options = @search_path = search_path end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'app/components/maglev/uikit/form/icon_field_component.rb', line 7 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'app/components/maglev/uikit/form/icon_field_component.rb', line 7 def @options end |
#search_path ⇒ Object (readonly)
Returns the value of attribute search_path.
7 8 9 |
# File 'app/components/maglev/uikit/form/icon_field_component.rb', line 7 def search_path @search_path end |
Instance Method Details
#dom_id ⇒ Object
15 16 17 |
# File 'app/components/maglev/uikit/form/icon_field_component.rb', line 15 def dom_id name.to_s.parameterize.underscore end |
#error ⇒ Object
27 28 29 |
# File 'app/components/maglev/uikit/form/icon_field_component.rb', line 27 def error [:error] end |
#label ⇒ Object
19 20 21 |
# File 'app/components/maglev/uikit/form/icon_field_component.rb', line 19 def label [:label] end |
#value ⇒ Object
23 24 25 |
# File 'app/components/maglev/uikit/form/icon_field_component.rb', line 23 def value [:value] end |