Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby
650 B
Raw Blame
<%# locals: (breadcrumbs:) %>

<div data-breadcrumbs class="py-2 flex items-center gap-2">
  <% breadcrumbs.each_with_index do |(name, path), index| %>
    <% if index > 0 %>
      <%= icon("chevron-right", color: "gray", size: "sm") %>
    <% end %>

    <% if path.present? && index < breadcrumbs.size - 1 %>
      <%= link_to name, path, class: "text-sm text-secondary font-medium focus-ring rounded-sm" %>
    <% elsif index == breadcrumbs.size - 1 %>
      <span class="text-primary font-medium text-sm"><%= name %></span>
    <% else %>
      <span class="text-sm text-secondary font-medium"><%= name %></span>
    <% end %>
  <% end %>
</div>