Sha256: 82ed1688c8509ab07c7e4b81dbd728f032ca06266ee4db57b4819e1d8a476aa6
Contents?: true
Size: 725 Bytes
Versions: 12
Compression:
Stored size: 725 Bytes
Contents
# frozen_string_literal: true module Ariadne module Forms module Dsl # :nodoc: class SubmitButtonInput < Input attr_reader :name, :label, :block def initialize(**options, &block) @block = block super(**options) end def to_component html_attrs = @input_attributes || {} @block.call(Ariadne::UI::Button::Component.new(type: :submit, **@options, html_attrs: html_attrs)) end def before_render content # ensures that block is called end # :nocov: def type :submit_button end def supports_validation? false end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems