Skip to content

Commit

Permalink
Make last breadcrumb element bold of it matches the current page_titl…
Browse files Browse the repository at this point in the history
…e. Otherwise, it has a nested breadcrumb element and takes care of the font_weight itself.
  • Loading branch information
HDinger committed Apr 26, 2024
1 parent ff849d7 commit 0457be2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
@@ -1,7 +1,7 @@
<%=
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title { page_title }
header.with_breadcrumbs(breadcrumb_items)
header.with_breadcrumbs(breadcrumb_items, selected_item_font_weight: current_breadcrumb_element == page_title ? :bold : :normal)

header.with_action_button(scheme: :primary,
mobile_icon: :plus,
Expand Down
Expand Up @@ -2,7 +2,7 @@
render(Primer::OpenProject::PageHeader.new) do |header|
if show_state?
header.with_title(data: { 'test-selector': 'project-query-name'}) { page_title }
header.with_breadcrumbs(breadcrumb_items)
header.with_breadcrumbs(breadcrumb_items, selected_item_font_weight: current_breadcrumb_element == page_title ? :bold : :normal)

if query_saveable?
header.with_action_text { t('lists.can_be_saved_as') }
Expand Down

0 comments on commit 0457be2

Please sign in to comment.