Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bulma): Add textarea class to text field #14

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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