1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-23 07:09:39 +02:00
Maybe/app/components/link_component.html.erb
Alex Hatzenbuhler c0267d5665
Use icon helper for all-the-things (#2191)
* Use icon helper for all-the-things

* Pass size and color to the icon from buttonish components directly
2025-05-06 12:08:18 -04:00

15 lines
342 B
Text

<%= link_to href, **merged_opts do %>
<% if icon && (icon_position != "right") %>
<%= helpers.icon(icon, size: size, color: icon_color) %>
<% end %>
<% unless icon_only? %>
<%= text %>
<% end %>
<% if icon && icon_position == "right" %>
<%= helpers.icon(icon, size: size, color: icon_color) %>
<% end %>
<% end %>