Class: Primer::Forms::TextArea

Inherits:
BaseComponent show all
Defined in:
app/lib/primer/forms/text_area.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods inherited from BaseComponent

#content, inherited, #input?, #perform_render, #render?, #to_component, #type

Methods included from ActsAsComponent

#base_template_path, #compile!, extended, #renders_templates, #template_root_path

Methods included from ClassNameHelper

#class_names

Constructor Details

#initialize(input:) ⇒ TextArea

Returns a new instance of TextArea.



9
10
11
12
13
14
15
16
17
# File 'app/lib/primer/forms/text_area.rb', line 9

def initialize(input:)
  @input = input
  @input.add_input_classes("FormControl-input", "FormControl-textarea")

  @field_wrap_arguments = {
    class: class_names("FormControl-input-wrap"),
    hidden: @input.hidden?
  }
end