Sha256: ce234e2aef5b651670dfcae31d3f60662174b4e06e8817bf465ba3544e2c0562

Contents?: true

Size: 553 Bytes

Versions: 8

Compression:

Stored size: 553 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbForm
    module FormBuilder
      class ActionArea < Playbook::KitBase
        prop :submit_default_value, type: Playbook::Props::String

        def submit(value = nil, props: {})
          props[:type] ||= "submit"
          button(value, props: props)
        end

        def button(value = nil, props:)
          props[:text] ||= value || submit_default_value

          content_tag(:li) do
            pb_rails("button", props: props)
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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