Class: Primer::Alpha::Dropdown
- Defined in:
 - app/components/primer/alpha/dropdown.rb,
app/components/primer/alpha/dropdown/menu.rb 
Overview
‘Dropdown` is a lightweight context menu for housing navigation and actions. They’re great for instances where you don’t need the full power (and code) of the SelectMenu.
Defined Under Namespace
Classes: Menu
Constant Summary
Constants inherited from Component
Component::INVALID_ARIA_LABEL_TAGS
Constants included from Status::Dsl
Constants included from ViewHelper
Constants included from TestSelectorHelper
TestSelectorHelper::TEST_SELECTOR_TAG
Constants included from FetchOrFallbackHelper
FetchOrFallbackHelper::InvalidValueError
Constants included from Primer::AttributesHelper
Primer::AttributesHelper::PLURAL_ARIA_ATTRIBUTES, Primer::AttributesHelper::PLURAL_DATA_ATTRIBUTES
Instance Method Summary collapse
- 
  
    
      #initialize(overlay: :default, with_caret: false, **system_arguments)  ⇒ Dropdown 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Dropdown.
 - #render? ⇒ Boolean
 
Methods inherited from Component
Methods included from JoinStyleArgumentsHelper
Methods included from TestSelectorHelper
Methods included from FetchOrFallbackHelper
#fetch_or_fallback, #fetch_or_fallback_boolean, #silence_deprecations?
Methods included from ClassNameHelper
Methods included from Primer::AttributesHelper
#aria, #data, #merge_aria, #merge_data, #merge_prefixed_attribute_hashes
Constructor Details
#initialize(overlay: :default, with_caret: false, **system_arguments) ⇒ Dropdown
Returns a new instance of Dropdown.
      32 33 34 35 36 37 38 39 40 41 42  | 
    
      # File 'app/components/primer/alpha/dropdown.rb', line 32 def initialize(overlay: :default, with_caret: false, **system_arguments) @with_caret = with_caret @system_arguments = system_arguments @system_arguments[:overlay] = @system_arguments[:reset] = true @system_arguments[:classes] = class_names( @system_arguments[:classes], "dropdown" ) end  | 
  
Instance Method Details
#render? ⇒ Boolean
      44 45 46  | 
    
      # File 'app/components/primer/alpha/dropdown.rb', line 44 def render? && end  |