Sha256: 2f1c30a881f939b82d2626c8e572cd2e84221d822c0c9e053337cab9d4c6da4b

Contents?: true

Size: 520 Bytes

Versions: 2

Compression:

Stored size: 520 Bytes

Contents

# frozen_string_literal: true

module Yattho
  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

2 entries across 2 versions & 1 rubygems

Version Path
yattho_view_components-0.1.1 lib/yattho/forms/dsl/button_input.rb
yattho_view_components-0.0.1 lib/yattho/forms/dsl/button_input.rb