1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 15:35:22 +02:00

Use icon helper for all-the-things

This commit is contained in:
hatz 2025-05-02 09:31:26 -05:00
parent 793a5d2502
commit 801832e109
No known key found for this signature in database
5 changed files with 11 additions and 11 deletions

View file

@ -1,6 +1,6 @@
<%= container do %>
<% if icon && (icon_position != :right) %>
<%= lucide_icon(icon, class: icon_classes) %>
<%= helpers.icon(icon, class: icon_classes) %>
<% end %>
<% unless icon_only? %>
@ -8,6 +8,6 @@
<% end %>
<% if icon && icon_position == :right %>
<%= lucide_icon(icon, class: icon_classes) %>
<%= helpers.icon(icon, class: icon_classes) %>
<% end %>
<% end %>

View file

@ -4,7 +4,7 @@
) do %>
<div class="flex items-center gap-3">
<% if align == :left %>
<%= lucide_icon "chevron-right", class: "fg-gray w-5 h-5 group-open:transform group-open:rotate-90" %>
<%= helpers.icon "chevron-right", class: "group-open:transform group-open:rotate-90" %>
<% end %>
<%= tag.span class: class_names("font-medium", align == :left ? "text-sm text-primary" : "text-xs uppercase text-secondary") do %>
@ -13,7 +13,7 @@
</div>
<% if align == :right %>
<%= lucide_icon "chevron-down", class: "fg-gray w-5 h-5 group-open:transform group-open:rotate-180" %>
<%= helpers.icon "chevron-down", class: "group-open:transform group-open:rotate-180" %>
<% elsif summary_content? %>
<%= summary_content %>
<% end %>

View file

@ -1,6 +1,6 @@
<%= link_to href, **merged_opts do %>
<% if icon && (icon_position != "right") %>
<%= lucide_icon(icon, class: icon_classes) %>
<%= helpers.icon(icon, class: icon_classes) %>
<% end %>
<% unless icon_only? %>
@ -8,6 +8,6 @@
<% end %>
<% if icon && icon_position == "right" %>
<%= lucide_icon(icon, class: icon_classes) %>
<%= helpers.icon(icon, class: icon_classes) %>
<% end %>
<% end %>

View file

@ -4,7 +4,7 @@
<div class="px-1">
<%= wrapper do %>
<% if icon %>
<%= lucide_icon(icon, class: destructive? ? "text-destructive" : "fg-gray") %>
<%= helpers.icon(icon, color: destructive? ? :destructive : :default) %>
<% end %>
<%= tag.span(text, class: text_classes) %>
<% end %>

View file

@ -2,7 +2,7 @@
<li class="flex items-center gap-1 text-sm border border-secondary rounded-3xl p-1.5">
<% if param_key == "start_date" || param_key == "end_date" %>
<div class="flex items-center gap-2">
<%= lucide_icon "calendar", class: "w-5 h-5 text-secondary" %>
<%= icon "calendar" %>
<p>
<% if param_key == "start_date" %>
<%= t(".on_or_after", date: param_value) %>
@ -13,7 +13,7 @@
</div>
<% elsif param_key == "search" %>
<div class="flex items-center gap-2">
<%= lucide_icon "text", class: "w-5 h-5 text-secondary" %>
<%= icon "text" %>
<p><%= "\"#{param_value}\"".truncate(20) %></p>
</div>
<% elsif param_key == "accounts" %>
@ -23,7 +23,7 @@
</div>
<% elsif param_key == "amount" %>
<div class="flex items-center gap-2">
<%= lucide_icon "hash", class: "w-5 h-5 text-secondary" %>
<%= icon "hash" %>
<p><%= param_value %></p>
</div>
<% elsif param_key == "types" %>
@ -45,6 +45,6 @@
method: :delete,
data: { turbo: false },
class: "flex items-center cursor-pointer" do %>
<%= lucide_icon "x", class: "w-4 h-4 text-secondary hover:text-primary" %>
<%= icon "x", size: "sm", class: "hover:text-primary" %>
<% end %>
</li>