app/views/lookbook/components/_nav_group.html.erb in lookbook-0.4.8 vs app/views/lookbook/components/_nav_group.html.erb in lookbook-0.5.0.beta.0
- old
+ new
@@ -1,17 +1,14 @@
-<li id="nav-group-<%= node.id %>" class="<%= classes %>" x-data="navGroup" :class="{hidden}" x-cloak>
- <div @click="toggle" class="nav-toggle py-[5px]" style="padding-left: calc((<%= node.hierarchy_depth - 1 %> * 12px) + 0.5rem);">
- <%= icon "${open ? 'chevron-down' : 'chevron-right'}", size: 3, class: "mr-1 text-gray-500" %>
- <%= icon node.type == :preview ? "layers" : "folder", size: 3.5, class: "mr-1.5 text-indigo-500" %>
- <div class="nav-label <%= "font-bold" if node.type == :preview %>" <% if node.type == :preview %> @click.stop="toggle(); navigateToFirstChild()"<% end %>>
- <%= node.label %>
+<li key="<%= node.id %>" class="<%= classes %>">
+ <div id="nav-group-<%= node.id %>" x-data="navGroup" :class="{hidden}" x-cloak>
+ <div @click="toggle" class="nav-toggle py-[5px]" style="padding-left: calc((<%= node.hierarchy_depth - 1 %> * 12px) + 0.5rem);">
+ <%= icon "${open ? 'chevron-down' : 'chevron-right'}", size: 3, class: "mr-1 text-gray-500" %>
+ <%= icon node.type == :preview ? "layers" : "folder", size: 3.5, class: "mr-1.5 text-indigo-500" %>
+ <div class="nav-label <%= "font-bold" if node.type == :preview %>" <% if node.type == :preview %> @click.stop="toggle(); navigateToFirstChild()"<% end %>>
+ <%= node.label %>
+ </div>
</div>
+ <ul x-ref="items" x-show="open" x-cloak>
+ <%= yield %>
+ </ul>
</div>
- <ul
- x-ref="items"
- x-show="open"
- id="nav-group-<%= node.id %>-children-<%= node.type == :preview ? node.get_examples.reject(&:hidden?).size : node.items.size %> %>"
- x-cloak
- >
- <%= yield %>
- </ul>
</li>
\ No newline at end of file