Sha256: 7ceae78a6be54077edf01a32cb05575441bcb29ef271a9638d1aadd4c6dbc03b
Contents?: true
Size: 734 Bytes
Versions: 32
Compression:
Stored size: 734 Bytes
Contents
# frozen_string_literal: true module Playbook module Forms class Builder 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
32 entries across 32 versions & 1 rubygems