Sha256: a584ac18f9ec2df2940b037a7e19e6ec6868cb01a107a78d3968a8ca216a2a9e

Contents?: true

Size: 1.21 KB

Versions: 18

Compression:

Stored size: 1.21 KB

Contents

<%= render Primer::OpenProject::PageHeader.new do |header| %>
  <%= header.with_title(variant: variant) { title } %>
  <%= 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 %>

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
openproject-primer_view_components-0.40.0 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.39.1 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.39.0 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.38.0 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.37.1 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.37.0 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.36.2 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.36.1 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.36.0 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.35.2 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.35.1 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.35.0 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.34.0 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.33.2 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.33.1 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.33.0 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.32.1 previews/primer/open_project/page_header_preview/playground.html.erb
openproject-primer_view_components-0.32.0 previews/primer/open_project/page_header_preview/playground.html.erb