Sha256: 71f46c1fae7195362976a6a6181627af76440724fbfb6b59c8c482f6260ec149

Contents?: true

Size: 582 Bytes

Versions: 89

Compression:

Stored size: 582 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Forms
    module Dsl
      # :nodoc:
      class ButtonInput < Input
        attr_reader :name, :label, :block

        def initialize(name:, label:, **system_arguments, &block)
          @name = name
          @label = label
          @block = block

          super(**system_arguments)
        end

        def to_component
          Button.new(input: self)
        end

        # :nocov:
        def type
          :button
        end

        def supports_validation?
          false
        end
      end
    end
  end
end

Version data entries

89 entries across 89 versions & 2 rubygems

Version Path
primer_view_components-0.19.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.22.2 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.18.2 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.22.1 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.18.1 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.22.0 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.18.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.21.0 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.17.0 lib/primer/forms/dsl/button_input.rb