Method: Primer::OpenProject::PageHeader#initialize

Defined in:
app/components/primer/open_project/page_header.rb

#initialize(mobile_menu_label: I18n.t("label_more"), state: STATE_DEFAULT, **system_arguments) ⇒ PageHeader

Returns a new instance of PageHeader.

Parameters:

  • mobile_menu_label (String) (defaults to: I18n.t("label_more"))

    The tooltip label of the mobile menu

  • system_arguments (Hash)

    <%= link_to_system_arguments_docs %>


235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# File 'app/components/primer/open_project/page_header.rb', line 235

def initialize(mobile_menu_label: I18n.t("label_more"), state: STATE_DEFAULT, **system_arguments)
  @system_arguments = deny_tag_argument(**system_arguments)
  @mobile_menu_label = mobile_menu_label

  @system_arguments[:tag] = :"page-header"
  @system_arguments[:classes] =
    class_names(
      @system_arguments[:classes],
      "PageHeader"
    )

  @state = fetch_or_fallback(STATE_OPTIONS, state, STATE_DEFAULT)

  @mobile_action_menu = Primer::Alpha::ActionMenu.new(
    display: MOBILE_ACTIONS_DISPLAY,
    anchor_align: :end
  )
end