Sha256: 852da9462de6a86f2b04fb33d761ea443d617da9e5daad205e842d43ae69fc92

Contents?: true

Size: 797 Bytes

Versions: 9

Compression:

Stored size: 797 Bytes

Contents

<% yield p = np %>

<% method ||= nil %>
<% active ||= request.path == url %>

<%= send (method ? :button_to : :link_to), url, class: "block group hover:text-white hover:no-underline #{'bg-primary-900 dark:bg-black dark:bg-opacity-10' if active} text-white #{@menu_orientation == :top ? "px-5 py-5" : "px-2 py-2 rounded-md hover-indent-child"} #{"rounded-tl-lg" unless @not_first} dark:text-white", method: method do %>
  <div class="inline-block indent-child flex items-center">
    <!-- Heroicon name: home -->
    <% if p.content_for? :icon %>
      <span class="mr-3 h-6 w-6 text-center text-secondary-300 text-xl leading-6 dark:text-gray-400">
        <%= p.content_for :icon %>
      </span>
    <% end %>
    <%= label %>
  </div>
<% end %>

<% # Ugly, but works. %>
<% @not_first = true %>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bullet_train-themes-light-1.2.10 app/views/themes/light/menu/_item.html.erb
bullet_train-themes-light-1.2.9 app/views/themes/light/menu/_item.html.erb
bullet_train-themes-light-1.2.8 app/views/themes/light/menu/_item.html.erb
bullet_train-themes-light-1.2.7 app/views/themes/light/menu/_item.html.erb
bullet_train-themes-light-1.2.6 app/views/themes/light/menu/_item.html.erb
bullet_train-themes-light-1.2.5 app/views/themes/light/menu/_item.html.erb
bullet_train-themes-light-1.2.4 app/views/themes/light/menu/_item.html.erb
bullet_train-themes-light-1.2.3 app/views/themes/light/menu/_item.html.erb
bullet_train-themes-light-1.2.2 app/views/themes/light/menu/_item.html.erb