Sha256: de82aefd7dedfd8291977ae0f1654405caf29beb88c41dd4c5c2c181dff8e992

Contents?: true

Size: 732 Bytes

Versions: 30

Compression:

Stored size: 732 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Forms
    module Dsl
      # :nodoc:
      class FormReferenceInput < Input
        attr_reader :ref_block, :fields_for_args, :fields_for_kwargs

        def initialize(*fields_for_args, builder:, form:, **fields_for_kwargs, &block)
          @fields_for_args = fields_for_args
          @fields_for_kwargs = fields_for_kwargs
          @ref_block = block

          super(builder: builder, form: form, **fields_for_kwargs)
        end

        def to_component
          FormReference.new(input: self)
        end

        def name
          nil
        end

        def label
          nil
        end

        def type
          :form
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
primer_view_components-0.0.115 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.114 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.113 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.112 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.111 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.110 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.109 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.108 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.107 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.106 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.105 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.104 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.103 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.102 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.101 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.100 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.99 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.98 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.97 lib/primer/forms/dsl/form_reference_input.rb
primer_view_components-0.0.96 lib/primer/forms/dsl/form_reference_input.rb