Method: Primer::Alpha::ActionMenu#with_avatar_item

Defined in:
app/components/primer/alpha/action_menu.rb

#with_avatar_item(**system_arguments, &block) ⇒ Object

Adds an avatar item to the list. Avatar items are a convenient way to accessibly add an item with a leading avatar image.

Parameters:

  • src (String)

    The source url of the avatar image.

  • username (String)

    The username associated with the avatar.

  • full_name (String)

    Optional. The user’s full name.

  • full_name_scheme (Symbol)

    Optional. How to display the user’s full name.

  • avatar_arguments (Hash)

    Optional. The arguments accepted by <%= link_to_component(Primer::Beta::Avatar) %>.

  • system_arguments (Hash)

    The arguments accepted by <%= link_to_component(Primer::Alpha::ActionList::Item) %>.

[View source]

293
294
295
# File 'app/components/primer/alpha/action_menu.rb', line 293

def with_avatar_item(**system_arguments, &block)
  @list.with_avatar_item(**system_arguments, &block)
end