Class: Primer::Forms::ActionMenu

Inherits:
BaseComponent show all
Defined in:
lib/primer/forms/action_menu.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes included from ActsAsComponent

#template_root_path

Instance Method Summary collapse

Methods inherited from BaseComponent

#content, inherited, #input?, #perform_render, #render?, #to_component, #type

Methods included from ActsAsComponent

#compile!, extended, #renders_templates

Methods included from ClassNameHelper

#class_names

Constructor Details

#initialize(input:) ⇒ ActionMenu

Returns a new instance of ActionMenu.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/primer/forms/action_menu.rb', line 9

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