mirror of
https://github.com/we-promise/sure.git
synced 2026-08-05 08:32:15 +00:00
- Dashboard balance-sheet weight cell wrapped its percentage ("64 %" -> two
lines) for 2-digit values: the account-row cell is w-14 (56px), too narrow
for the 5-bar gauge plus a spaced locale percentage (ca/es format "NN %").
Widen the account-row weight cell to w-20 to match the header/group columns
(also fixing the column misalignment) and add whitespace-nowrap to the value.
- Bump DS::Pill :md vertical padding py-0.5 -> py-1 so category pills (and the
other :md pills) are not vertically cramped.
13 lines
500 B
Plaintext
13 lines
500 B
Plaintext
<%# locals: (weight:, color:) %>
|
|
|
|
<% effective_weight = weight.presence || 0 %>
|
|
|
|
<div class="w-full flex items-center justify-between gap-2">
|
|
<div class="flex gap-[3px]">
|
|
<% 5.times do |i| %>
|
|
<div class="w-0.5 h-2.5 rounded-lg <%= i < (effective_weight / 20.0).ceil ? "" : "opacity-20" %>" style="background-color: <%= color %>;"></div>
|
|
<% end %>
|
|
</div>
|
|
<p class="text-sm whitespace-nowrap privacy-sensitive"><%= number_to_percentage(effective_weight, precision: 0) %></p>
|
|
</div>
|