1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00
Maybe/app/views/shared/_trend_change.html.erb

10 lines
391 B
Text
Raw Normal View History

<%# locals: (trend:) %>
<% styles = trend_styles(trend) %>
<p class="text-sm <%= styles[:text_class] %>">
<% if trend.direction == "flat" %>
<span>No change</span>
<% else %>
<span><%= styles[:symbol] %><%= format_money trend.value.abs %></span>
<span>(<%= lucide_icon(styles[:icon], class: "w-4 h-4 align-text-bottom inline") %><%= trend.percent %>%)</span>
<% end %>
</p>