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.30.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.39.1 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.39.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.38.0 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.29.0 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.28.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.37.1 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.37.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.36.2 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.36.1 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.36.0 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.27.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.35.2 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.35.1 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.26.1 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.35.0 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.26.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.34.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.33.2 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.33.1 lib/primer/forms/dsl/button_input.rb