Files
sure/app/views/shared/_trend_change.html.erb
Zach Gollwitzer f5f624881f Add placeholders for dashboard features (#642)
* Add placeholders for new dashboard

* Fix tests and lint errors
2024-04-18 10:32:36 -04:00

11 lines
440 B
Plaintext

<%# 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] %><%= trend.value.is_a?(Money) ? format_money(trend.value.abs) : trend.value.abs %></span>
<span>(<%= lucide_icon(styles[:icon], class: "w-4 h-4 align-text-bottom inline") %><%= trend.percent %>%)</span>
<% end %>
</p>