Sha256: 29031a6c649ce17cea02960339f2b19a2a4edf3f00c6a9587daf8d21129dc4d3
Contents?: true
Size: 740 Bytes
Versions: 22
Compression:
Stored size: 740 Bytes
Contents
# frozen_string_literal: true module Playbook module PbForm module FormBuilder class ActionArea def initialize(view_context, submit_default_value) self.view_context = view_context self.submit_default_value = submit_default_value end def submit(value = nil, props: {}) props[:type] ||= "submit" props[:text] ||= value || submit_default_value button(value, props: props) end def button(value = nil, props:) view_context.content_tag(:li) do view_context.pb_rails("button", props: props) end end private attr_accessor :view_context, :submit_default_value end end end end
Version data entries
22 entries across 22 versions & 1 rubygems