Sha256: 5961cf468294f28c0c404a09dcdb73fa4c5beff4657974fd6c3feb932b5e60da

Contents?: true

Size: 1.07 KB

Versions: 4

Compression:

Stored size: 1.07 KB

Contents

# frozen_string_literal: true

module Playbook
  module PbForm
    module FormBuilder
      extend ActiveSupport::Concern

      included do
        prepend(FormFieldBuilder.new(:email_field, kit_name: "text_input"))
        prepend(FormFieldBuilder.new(:number_field, kit_name: "text_input"))
        prepend(FormFieldBuilder.new(:search_field, kit_name: "text_input"))
        prepend(FormFieldBuilder.new(:telephone_field, kit_name: "text_input"))
        prepend(FormFieldBuilder.new(:text_field, kit_name: "text_input"))
        prepend(FormFieldBuilder.new(:password_field, kit_name: "text_input"))
        prepend(FormFieldBuilder.new(:url_field, kit_name: "text_input"))
        prepend(FormFieldBuilder.new(:text_area, kit_name: "textarea"))
        prepend(TypeaheadField)
        prepend(SelectField)
        prepend(CollectionSelectField)
        prepend(CheckboxField)
        prepend(DatePickerField)

        def actions(&block)
          @template.render_component ActionArea.new(submit_default_value: submit_default_value, children: block)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
playbook_ui-8.2.0.pre.alpha2 app/pb_kits/playbook/pb_form/form_builder.rb
playbook_ui-8.2.0.pre.alpha1 app/pb_kits/playbook/pb_form/form_builder.rb
playbook_ui-8.1.0 app/pb_kits/playbook/pb_form/form_builder.rb
playbook_ui-8.0.1 app/pb_kits/playbook/pb_form/form_builder.rb