Sha256: b8aa858611801f2cae528c7503b0d15109500b64a805e44c800d920662bd3807

Contents?: true

Size: 955 Bytes

Versions: 3

Compression:

Stored size: 955 Bytes

Contents

<%= render_component_tag :li,
  id: id,
  class: "list-none",
  "x-show": "!filteredOut",
  data: {
    "entity-type": item.type
  },
  cloak: true do %>
  <%= render_tag href.present? ? :a : :div,
    href: href,
    class: "flex items-center py-1 select-none cursor-pointer text-lookbook-nav-text hover:bg-lookbook-nav-item-hover",
    style: "padding-left: #{left_pad}px",
    "x-bind": "bindings.#{href.present? ? "link" : "toggle"}" do %>
    <div class="relative flex items-center">
      <%= icon nil,
        size: 3,
        class: "mr-1 text-lookbook-nav-toggle absolute -left-4",
        "x-effect": "iconName = open ? 'chevron-down' : 'chevron-right'" if children? %>
      <%= icon nav_icon, size: 3.5, class: "mr-1.5 text-lookbook-nav-icon-stroke" %>
      <span><%= label %></span>
    </div>
  <% end %>
  
  <% if children? %>
    <ul x-ref="items" x-show="open" x-cloak>
      <%= safe_join(children) %>
    </ul>
  <% end %>  
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lookbook-1.0.0.beta.8 app/components/lookbook/nav/item/component.html.erb
lookbook-1.0.0.beta.7 app/components/lookbook/nav/item/component.html.erb
lookbook-1.0.0.beta.6 app/components/lookbook/nav/item/component.html.erb