Sha256: 88b0e887590c7af3a13b02739b334c242af4ff3a497783b9108dc6ecd984083b

Contents?: true

Size: 520 Bytes

Versions: 60

Compression:

Stored size: 520 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
      end
    end
  end
end

Version data entries

60 entries across 60 versions & 2 rubygems

Version Path
openproject-primer_view_components-0.20.0 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.16.1 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.16.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.19.0 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.15.1 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.15.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.18.1 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.17.1 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.17.0 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.14.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.16.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.15.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.14.0 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.13.1 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.13.2 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.13.1 lib/primer/forms/dsl/button_input.rb
openproject-primer_view_components-0.13.0 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.13.0 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.12.0 lib/primer/forms/dsl/button_input.rb
primer_view_components-0.11.0 lib/primer/forms/dsl/button_input.rb