Sha256: a11911113a5ef7ac78b03de0d6c7fea2a5d0a17dd6c7f77022469d683143dbdd
Contents?: true
Size: 1.21 KB
Versions: 95
Compression:
Stored size: 1.21 KB
Contents
# frozen_string_literal: true module Primer module Alpha class ActionMenu # This component is part of <%= link_to_component(Primer::Alpha::ActionMenu) %> and should not be # used as a standalone component. class ListWrapper < Primer::Alpha::ActionList add_polymorphic_slot_type( slot_name: :items, type: :group, callable: lambda { |**system_arguments| Primer::Alpha::ActionMenu::Group.new( **system_arguments, role: :group, select_variant: @select_variant ) } ) # @param menu_id [String] ID of the parent menu. # @param system_arguments [Hash] The arguments accepted by <%= link_to_component(Primer::Alpha::ActionList) %> def initialize(menu_id:, **system_arguments) @menu_id = menu_id system_arguments[:aria] = merge_aria( system_arguments, { aria: { labelledby: "#{@menu_id}-button" } } ) system_arguments[:role] = :menu system_arguments[:scheme] = :inset system_arguments[:id] = "#{@menu_id}-list" super(**system_arguments) end end end end end
Version data entries
95 entries across 95 versions & 2 rubygems