1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 13:19:39 +02:00
Maybe/app/components/button_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

13 lines
320 B
Text

<%= container 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 %>