Add sidebar link helper (#435)

* Add helper for sidebar nav links

* Allow options to be passed down to sidebar link
This commit is contained in:
Josh Brown
2024-02-11 18:47:58 +00:00
committed by GitHub
parent aef15c9371
commit e37ed2c988
2 changed files with 21 additions and 12 deletions

View File

@@ -47,22 +47,13 @@
<nav>
<ul class="mt-6 space-y">
<li>
<%= link_to root_path, class: 'block hover:bg-white border border-transparent hover:border-[#141414]/[0.07] rounded-xl hover:text-gray-900 hover:shadow-xs -ml-2 p-2 text-sm font-medium text-gray-500 flex items-center' do %>
<%= lucide_icon('layout-grid', class: 'w-5 h-5 mr-2') %>
<%= t('.dashboard') %>
<% end %>
<%= sidebar_link_to t('.dashboard'), root_path, icon: 'layout-grid' %>
</li>
<li>
<%= link_to accounts_path, class: 'block hover:bg-white border border-transparent hover:border-[#141414]/[0.07] rounded-xl hover:text-gray-900 hover:shadow-xs -ml-2 p-2 text-sm font-medium text-gray-500 flex items-center' do %>
<%= lucide_icon('layers', class: 'w-5 h-5 mr-2') %>
<%= t('.accounts') %>
<% end %>
<%= sidebar_link_to t('.accounts'), accounts_path, icon: 'layers' %>
</li>
<li>
<%= link_to "#", class: 'block hover:bg-white border border-transparent hover:border-[#141414]/[0.07] rounded-xl hover:text-gray-900 hover:shadow-xs -ml-2 p-2 text-sm font-medium text-gray-500 flex items-center' do %>
<%= lucide_icon('credit-card', class: 'w-5 h-5 mr-2') %>
<%= t('.transactions') %>
<% end %>
<%= sidebar_link_to t('.transactions'), "#", icon: 'credit-card' %>
</li>
</ul>
</nav>