Module: ViewComponent::InputTextareaComponent

Included in:
UiHelper
Defined in:
app/helpers/view_component/input_textarea_component.rb

Instance Method Summary collapse

Instance Method Details

#input_textarea_component(form:, field_name:, label:, placeholder:, value: nil, rows: 5, html_options: {}) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/helpers/view_component/input_textarea_component.rb', line 5

def input_textarea_component(
  form:,
  field_name:,
  label:,
  placeholder:,
  value: nil,
  rows: 5,
  html_options: {}
)
  html_options = html_options.merge(
    placeholder: placeholder,
    rows: rows
  )

  render partial: 'view_components/inputs/textarea', locals: {
    form:,
    field_name:,
    label:,
    value:,
    html_options:
  }
end