<%= render Primer::OpenProject::PageHeader.new(state: in_edit_state ? :edit : :show) do |header| %> <%= header.with_title(variant: variant) do |t| %> <% if in_edit_state %> <%= t.with_editable_form(model: nil, update_path: "/foo", cancel_path: "/bar") %> <% end %> <%= title %> <% end %> <%= header.with_description { description } %> <%= header.with_leading_action(icon: with_leading_action, href: '#', 'aria-label': "A leading action") if with_leading_action && with_leading_action != :none %> <%= header.with_breadcrumbs(breadcrumb_items) %> <% if with_actions %> <% header.with_action_icon_button(icon: 'pencil', mobile_icon: 'pencil', label: 'Edit') %> <% header.with_action_menu(menu_arguments: { anchor_align: :end }, button_arguments: { icon: "op-kebab-vertical", "aria-label": "Menu" }) do |menu, button| %> <% menu.with_item(label: "Subitem 1") do |item| %> <% item.with_leading_visual_icon(icon: :unlock) %> <% end %> <% menu.with_item(label: "Subitem 2", scheme: :danger) do |item| %> <% item.with_leading_visual_icon(icon: :trash) %> <% end %> <% end %> <% end %> <% if with_tab_nav %> <% header.with_tab_nav(label: "label") do |nav| %> <% nav.with_tab(selected: true, href: "#") { "Tab 1" } %> <% nav.with_tab(href: "#") { "Tab 2" } %> <% nav.with_tab(href: "#") { "Tab 3" } %> <% end %> <% end %> <% end %>