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.19.0 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.22.2 lib/primer/forms/action_menu.rb
primer_view_components-0.18.2 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.22.1 lib/primer/forms/action_menu.rb
primer_view_components-0.18.1 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.22.0 lib/primer/forms/action_menu.rb
primer_view_components-0.18.0 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.21.0 lib/primer/forms/action_menu.rb
primer_view_components-0.17.0 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.20.0 lib/primer/forms/action_menu.rb
primer_view_components-0.16.1 lib/primer/forms/action_menu.rb
primer_view_components-0.16.0 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.19.0 lib/primer/forms/action_menu.rb
primer_view_components-0.15.1 lib/primer/forms/action_menu.rb
primer_view_components-0.15.0 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.18.1 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.17.1 lib/primer/forms/action_menu.rb
openproject-primer_view_components-0.17.0 lib/primer/forms/action_menu.rb
primer_view_components-0.14.0 lib/primer/forms/action_menu.rb