module TailwindForm::FormGroup

Public Instance Methods

form_group(name, field_type = :text_field, classes = 'form__group') click to toggle source
# File lib/tailwind_form/form_group.rb, line 7
def form_group(name, field_type = :text_field, classes = 'form__group')
  function_name = "#{field_type}_with_tailwind"
  tag.div(class: classes) do
    tailwind_label_field(name) + send(function_name, name, { class: 'form__input' })
  end
end