Sha256: 317efdf9dd04a3e1ca266199b61ef8a7deff5db55b0a4aa899f67842397dec95

Contents?: true

Size: 548 Bytes

Versions: 99

Compression:

Stored size: 548 Bytes

Contents

# frozen_string_literal: true

module Primer
  module Forms
    # :nodoc:
    class ActionMenu < BaseComponent
      delegate :builder, :form, to: :@input

      def initialize(input:)
        @input = input

        @input.input_arguments[:form_arguments] = {
          name: @input.name,
          builder: builder
        }

        @input.input_arguments[:select_variant] ||= :single

        unless @input.input_arguments.include?(:dynamic_label)
          @input.input_arguments[:dynamic_label] = true
        end
      end
    end
  end
end

Version data entries

99 entries across 99 versions & 2 rubygems

Version Path
primer_view_components-0.30.0 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.39.1 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.39.0 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.38.0 lib/primer/forms/action_menu.rb
primer_view_components-0.29.0 lib/primer/forms/action_menu.rb
primer_view_components-0.28.0 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.37.1 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.37.0 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.36.2 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.36.1 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.36.0 lib/primer/forms/action_menu.rb
primer_view_components-0.27.0 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.35.2 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.35.1 lib/primer/forms/action_menu.rb
primer_view_components-0.26.1 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.35.0 lib/primer/forms/action_menu.rb
primer_view_components-0.26.0 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.34.0 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.33.2 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.33.1 lib/primer/forms/action_menu.rb