app/components/lookbook/nav/directory/component.html.erb in lookbook-2.0.0.beta.4 vs app/components/lookbook/nav/directory/component.html.erb in lookbook-2.0.0.beta.5
- old
+ new
@@ -9,13 +9,13 @@
key: "#{id}-action",
class: "nav-action",
style: "padding-left: #{left_pad}px",
"x-bind": "bindings.toggle" do %>
<div class="nav-action-inner">
- <%= icon nil,
- size: 3,
- class: "nav-toggle-icon",
- "x-effect": "iconName = open ? 'chevron-down' : 'chevron-right'" if children? %>
+ <% if children? %>
+ <%= icon "chevron-down", size: 3, class: "nav-toggle-icon", "x-show": "open", "x-cloak": "true" %>
+ <%= icon "chevron-right", size: 3, class: "nav-toggle-icon", "x-show": "!open", "x-cloak": "true" %>
+ <% end %>
<%= icon nav_icon, size: 3.5, class: "mr-1.5 text-lookbook-nav-icon-stroke" %>
<span class="truncate"><%= label %></span>
</div>
<% end %>
\ No newline at end of file