Sha256: fe41f369a2650b9e9cb1f92081e0c38b83428970bd59d5d6c8e09743ab20c41c

Contents?: true

Size: 1.48 KB

Versions: 4

Compression:

Stored size: 1.48 KB

Contents

<%= render component_tag(:nav, x: {data: "appSidebarNav"}) do %>
  <% if actions? %>
    <div class="nav-item mobile-nav-item nav-action">
      <%= render Coco::App::Blocks::SidebarNavItem.new(label: "Add", emphasise: true) do |item| %>
        <% item.with_icon do %>
          <span class="nav-actions-button">
            <%= coco_icon :plus, size: :xl %>
          </span>
        <% end %>

        <% item.with_menu(id: "actions-nav-link") do %>
          <% actions_data.each do |action| %>
            <%= coco_link(action[:href],
              **action.except(:label, :description, :href, :icon),
              theme: nil,
              class: "sidebar-nav-menu-item sidebar-nav-actions-item") do %>
              <div class="sidebar-nav-action">
                <div class="sidebar-nav-action-icon">
                  <%= coco_icon(action[:icon], size: :md) %>
                </div>
                <div class="sidebar-nav-action-detail">
                  <h4 class="sidebar-nav-action-label">
                    <%= action[:label] %>
                  </h4>
                  <% if action.key?(:description) %>
                    <div class="sidebar-nav-action-description">
                      <%= raw action[:description] %>
                    </div>
                  <% end %>
                </div>
              </div>
            <% end %>
          <% end %>
        <% end %>
      <% end %>
    </div>
  <% end %>

  <% items.each do |item| %>
    <%= item %>
  <% end %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
coveragebook_components-0.8.2 app/components/coco/app/blocks/sidebar_nav/sidebar_nav.html.erb
coveragebook_components-0.8.1 app/components/coco/app/blocks/sidebar_nav/sidebar_nav.html.erb
coveragebook_components-0.8.0 app/components/coco/app/blocks/sidebar_nav/sidebar_nav.html.erb
coveragebook_components-0.8.0.beta.3 app/components/coco/app/blocks/sidebar_nav/sidebar_nav.html.erb