Class: FoxTail::TextareaComponent
- Inherits:
-
InputBaseComponent
- Object
- ViewComponent::Base
- Base
- BaseComponent
- InputBaseComponent
- FoxTail::TextareaComponent
- Defined in:
- app/components/fox_tail/textarea_component.rb
Defined Under Namespace
Classes: AutoResizeStimulusController
Instance Attribute Summary
Attributes inherited from BaseComponent
Instance Method Summary collapse
Methods inherited from InputBaseComponent
stimulus_controller_name, #stimulus_controller_options, #use_stimulus?
Methods inherited from BaseComponent
classname_merger, #initialize, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class
Methods inherited from Base
Constructor Details
This class inherits a constructor from FoxTail::BaseComponent
Instance Method Details
#before_render ⇒ Object
6 7 8 9 10 11 |
# File 'app/components/fox_tail/textarea_component.rb', line 6 def before_render super html_attributes[:class] = classnames theme.apply(:root, self), html_class AutoResizeStimulusController.new.merge! html_attributes if self.class.use_stimulus? && autoresize? end |
#call ⇒ Object
13 14 15 |
# File 'app/components/fox_tail/textarea_component.rb', line 13 def call content_tag :textarea, object_name? ? value_from_object : content, html_attributes end |