# 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