Skip to content

Commit

Permalink
Add textarea class to text field (#14)
Browse files Browse the repository at this point in the history
[textarea Documentation](https://bulma.io/documentation/form/textarea/)

Closes #13
  • Loading branch information
JuanVqz authored Sep 12, 2024
1 parent 1e83518 commit 6065dab
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@
b.use :hint, wrap_with: { tag: 'small', class: 'help' }
end

# bulma vertical textarea field
config.wrappers :vertical_text_form, tag: 'div', class: 'field' do |b|
b.use :html5
b.use :placeholder
b.optional :readonly
b.use :label, class: 'label'
b.use :input, class: 'textarea', wrap_with: { tag: 'div', class: 'control' }, error_class: 'is-danger', valid_class: 'is-success'
b.use :full_error, wrap_with: { tag: 'div', class: 'help is-danger' }
b.use :hint, wrap_with: { tag: 'small', class: 'form-text text-muted' }
end

# The default wrapper to be used by the FormBuilder.
config.default_wrapper = :vertical_form

Expand All @@ -121,6 +132,7 @@
file: :vertical_file,
radio_buttons: :vertical_collection,
range: :vertical_range,
time: :vertical_multi_select
time: :vertical_multi_select,
text: :vertical_text_form
}
end

0 comments on commit 6065dab

Please sign in to comment.