Sha256: 2b66b7d1dd3c1b24abda554ccc97bfefb0c78963e9faa7036f7b1722cb98f7eb

Contents?: true

Size: 1.03 KB

Versions: 40

Compression:

Stored size: 1.03 KB

Contents

<%= render(Primer::OpenProject::PageHeader.new) do |component| %>
  <% component.with_title do %>
    Great news
  <% end %>
  <% component.with_description do %>
    This example lists all possible actions of a PageHeader. Of course, you will most likely never need all of them on the same page as it is shown here.
  <% end %>
  <% component.with_breadcrumbs([{ href: "/foo", text: "Foo" }, { href: "/bar", text: "Bar" }, "Baz"]) %>
  <% component.with_action_text { "An additional hint" } %>
  <% component.with_action_link(mobile_icon: "link", mobile_label: "Community", href: "https://community.openproject.com", target: "_blank") { "Go to community" } %>
  <% component.with_action_button(mobile_icon: "star", mobile_label: "Star") do |button|%>
      <% button.with_leading_visual_icon(icon: "star") %>
      Star
  <% end %>
  <% component.with_action_button(mobile_icon: nil, mobile_label: nil) { "Hide on mobile" } %>
  <% component.with_action_icon_button(icon: "trash", mobile_icon: "trash", label: "Delete", scheme: :danger) %>
<% end %>

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
openproject-primer_view_components-0.38.0 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.37.1 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.37.0 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.36.2 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.36.1 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.36.0 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.35.2 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.35.1 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.35.0 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.34.0 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.33.2 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.33.1 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.33.0 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.32.1 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.32.0 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.29.1 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.29.0 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.28.1 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.28.0 previews/primer/open_project/page_header_preview/actions.html.erb
openproject-primer_view_components-0.27.0 previews/primer/open_project/page_header_preview/actions.html.erb