app/views/lookbook/components/_nav_item.html.erb in lookbook-0.6.1 vs app/views/lookbook/components/_nav_item.html.erb in lookbook-0.7.0
- old
+ new
@@ -1,20 +1,21 @@
<%
-path = show_path item.path
+path = show_path(item.lookup_path)
display ||= :item
label ||= item.label
+item_icon = display == :node ? "layers" : "eye"
%>
-<li key="<%= item.id %>">
+<li key="nav-item-<%= item.id %>-item">
<div id="nav-item-<%= item.id %>" x-data="navItem(<%= item.matchers.to_json %>)" :class="{hidden}" data-path="<%= path %>" x-cloak>
<a href="<%= path %>"
class="nav-link pr-3 py-[5px] flex items-center w-full group transition hover:bg-gray-200 hover:bg-opacity-50"
style="padding-left: calc((<%= depth - 1 %> * 12px) + 0.5rem);"
x-ref="link"
:class="{'!bg-indigo-100':active}"
@click.stop.prevent="navigate"
>
<div class="relative w-3.5 h-3.5 mr-1.5 <%= "ml-[3px]" if display == :node %> " :class="active ? 'text-gray-900' : 'text-indigo-500'">
- <%= icon display == :node ? "layers" : "eye", size: 3.5, class: "group-hover:text-indigo-800" %>
+ <%= icon item_icon, size: 3.5, class: "group-hover:text-indigo-800" %>
</div>
<div class="truncate whitespace-nowrap select-none <%= "font-bold" if display == :node %>">
<%= label %>
</div>
</a>
\ No newline at end of file