class Primer::Alpha::ActionBar::Item

ActionBar::Item is an internal component that wraps the items in a div with the ‘ActionBar-item` class.

def call

def call
  render(Primer::BaseComponent.new(**@system_arguments)) { render(@item_content) }
end

def initialize(item_content, **item_arguments)

Parameters:
  • item_arguments (Hash) -- <%= link_to_system_arguments_docs %>
  • item_content (String) -- The content to render inside the item.
def initialize(item_content, **item_arguments)
  @system_arguments = {
    tag: item_arguments[:tag] || :div,
    data: {
      targets: "action-bar.items"
    }.merge(item_arguments[:data] || {}),
    classes: class_names("ActionBar-item", item_arguments[:classes])
  }
  @item_content = item_content
end