Class: Practical::Views::Form::OptionLabelComponent
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Practical::Views::Form::OptionLabelComponent
- Defined in:
- app/components/practical/views/form/option_label_component.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options: {}) ⇒ OptionLabelComponent
constructor
A new instance of OptionLabelComponent.
Constructor Details
#initialize(options: {}) ⇒ OptionLabelComponent
Returns a new instance of OptionLabelComponent.
8 9 10 |
# File 'app/components/practical/views/form/option_label_component.rb', line 8 def initialize(options: {}) self. = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'app/components/practical/views/form/option_label_component.rb', line 6 def @options end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/components/practical/views/form/option_label_component.rb', line 13 def call tag.section(**mix({class: "wa-stack wa-size-s wa-gap-0"}, )) { safe_join([ tag.span(title), tag.small(description, class: "wa-quiet"), ]) } end |