# frozen_string_literal: true module Primer module Alpha # `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. class Dropdown < Primer::Component status :alpha # Required trigger for the dropdown. Has the same arguments as <%= link_to_component(Primer::ButtonComponent) %>, # but it is locked as a `summary` tag. renders_one :button, lambda { |**system_arguments| @button_arguments = system_arguments @button_arguments[:button] = true @button_arguments[:dropdown] = @with_caret Primer::Content.new } # Required context menu for the dropdown. # # @param as [Symbol] When `as` is `:list`, wraps the menu in a `