Class: Playbook::PbForm::FormBuilder::ActionArea

Inherits:
KitBase
  • Object
show all
Defined in:
app/pb_kits/playbook/pb_form/form_builder/action_area.rb

Instance Method Summary collapse

Methods inherited from KitBase

#object

Methods included from ZIndex

included

Methods included from Spacing

included, #max_width_options, #max_width_props, #max_width_values, #spacing_options, #spacing_props, #spacing_values

Methods included from Classnames

#generate_classname, #generate_classname_without_spacing, included

Methods included from Playbook::Props

#initialize, #prop

Methods included from Playbook::PbKitHelper

#pb_rails

Instance Method Details

#button(value = nil, props:) ⇒ Object



14
15
16
17
18
19
20
# File 'app/pb_kits/playbook/pb_form/form_builder/action_area.rb', line 14

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

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

#submit(value = nil, props: {}) ⇒ Object



9
10
11
12
# File 'app/pb_kits/playbook/pb_form/form_builder/action_area.rb', line 9

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