Sha256: 5a390cced5f64a549c7118170697ec15fe50656f6da5177524a3a6d1a8ec61cc

Contents?: true

Size: 908 Bytes

Versions: 4

Compression:

Stored size: 908 Bytes

Contents

<li class="group <%= "active" if active? %>">
  <a
    href="<%= path %>"
    aria-current="<%= @item.current?(@url_helpers, @fullpath) ? "page" : "false" %>"
    class="
      flex gap-3 items-center
      py-1 px-3 rounded
      hover:text-red-500 hover:bg-gray-50
      <%= "text-red-600 bg-gray-50" if active? %>
      <%= @item.top_level ? "font-semibold text-sm text-black" : "font-normal text-sm text-gray-600" %>
    "
  >
    <i class="w-[1.125rem] h-[1.125rem] font-normal text-sm flex">
      <% if @item.icon %>
        <%= icon_tag(@item.icon, class: "inline-block w-full h-full fill-current") %>
      <% end %>
    </i>
    <%= @item.name %>
  </a>

  <% if @item.children? %>
    <ul class="flex flex-col gap-0.5 pt-0.5 <%= "hidden" unless active? %>">
      <%= render self.class.with_collection(@item.children, url_helpers: @url_helpers, fullpath: @fullpath) %>
    </ul>
  <% end %>
</li>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
solidus_admin-0.3.1 app/components/solidus_admin/layout/navigation/item/component.html.erb
solidus_admin-0.3.0 app/components/solidus_admin/layout/navigation/item/component.html.erb
solidus_admin-0.2.0 app/components/solidus_admin/layout/navigation/item/component.html.erb
solidus_admin-0.1.0 app/components/solidus_admin/layout/navigation/item/component.html.erb