Class: Primer::Forms::TextArea
- Inherits:
-
BaseComponent
- Object
- BaseComponent
- Primer::Forms::TextArea
- Defined in:
- app/lib/primer/forms/text_area.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(input:) ⇒ TextArea
constructor
A new instance of TextArea.
Methods inherited from BaseComponent
compile!, #content, #input?, #perform_render, #render?, #to_component, #type
Methods included from ActsAsComponent
#compile!, extended, #renders_templates
Methods included from ClassNameHelper
Constructor Details
#initialize(input:) ⇒ TextArea
Returns a new instance of TextArea.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/lib/primer/forms/text_area.rb', line 9 def initialize(input:) @input = input @input.add_input_classes("FormControl-input", "FormControl-textarea") wrap_classes = [ "FormControl-input-wrap", ] wrap_classes << Primer::Forms::Dsl::Input::INPUT_WIDTH_MAPPINGS[@input.input_width] if @input.input_width @field_wrap_arguments = { class: class_names(wrap_classes), hidden: @input.hidden? } end |