Class: Anchor::TextAreaComponent
- Defined in:
- app/components/anchor/text_area_component.rb
Constant Summary collapse
- INPUT_CLASSES =
InputComponent::INPUT_CLASSES + ["h-[120px]"]
Constants included from ViewHelper
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
Instance Method Summary collapse
-
#initialize(form_builder:, attribute:, **kwargs) ⇒ TextAreaComponent
constructor
A new instance of TextAreaComponent.
- #options ⇒ Object
Methods inherited from Component
Methods included from ViewHelper
#anchor_form_with, #anchor_svg, #deep_blank?, #merge_options, #popover_trigger_attributes
Methods included from FetchOrFallbackHelper
Constructor Details
#initialize(form_builder:, attribute:, **kwargs) ⇒ TextAreaComponent
Returns a new instance of TextAreaComponent.
5 6 7 8 9 10 |
# File 'app/components/anchor/text_area_component.rb', line 5 def initialize(form_builder:, attribute:, **kwargs) @form_builder = form_builder @attribute = attribute super(**kwargs) end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
12 13 14 |
# File 'app/components/anchor/text_area_component.rb', line 12 def attribute @attribute end |
Instance Method Details
#options ⇒ Object
14 15 16 17 18 19 |
# File 'app/components/anchor/text_area_component.rb', line 14 def { class: INPUT_CLASSES, data: { testid: "text-area-#{attribute.to_s.dasherize}" }, } end |