Sha256: 15a2d5c816983c2317298adadf5915ca9fed763daaab320262bb9925477448a3

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 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), &block
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
playbook_ui-8.0.0 app/pb_kits/playbook/pb_form/form_builder.rb
playbook_ui-8.0.0.pre.alpha5 app/pb_kits/playbook/pb_form/form_builder.rb
playbook_ui-8.0.0.pre.alpha4 app/pb_kits/playbook/pb_form/form_builder.rb
playbook_ui-8.0.0.pre.alpha1 app/pb_kits/playbook/pb_form/form_builder.rb