mirror of
https://github.com/we-promise/sure.git
synced 2026-05-25 05:24:57 +00:00
refactor(transactions): migrate transfer_match badges to DS::Pill (#1939)
Follow-up to #1917 — the responsive label-swap pair in `_transfer_match.html.erb` was deferred because DS::Pill has no caller-controlled `class:` arg yet. Wrapping each `DS::Pill` in a `<span>` with the responsive visibility classes (`hidden lg:inline` / `inline lg:hidden`) gets the same effect without expanding the component API — the parent span's `display` controls visibility, the child pill keeps its own `inline-flex` chrome when visible. Closes the last open callsite from #1917's deferred-list. Same tone (`:neutral`) and shape (`marker: false` rounded-full) as the other neutral status badges migrated in PR B.
This commit is contained in:
committed by
GitHub
parent
0497b1d7c1
commit
3d182bc67a
@@ -6,11 +6,21 @@
|
||||
<%= icon "link-2", size: "sm", class: "text-secondary" %>
|
||||
</span>
|
||||
<% elsif transaction.transfer.pending? %>
|
||||
<span class="hidden lg:inline-flex items-center rounded-full bg-surface-inset px-2 py-0.5 text-xs font-medium text-secondary">
|
||||
<%= t("transactions.transfer_match.auto_matched") %>
|
||||
<span class="hidden lg:inline">
|
||||
<%= render DS::Pill.new(
|
||||
label: t("transactions.transfer_match.auto_matched"),
|
||||
tone: :neutral,
|
||||
marker: false,
|
||||
show_dot: false
|
||||
) %>
|
||||
</span>
|
||||
<span class="inline-flex lg:hidden items-center rounded-full bg-surface-inset px-2 py-0.5 text-xs font-medium text-secondary">
|
||||
<%= t("transactions.transfer_match.auto_matched_short") %>
|
||||
<span class="inline lg:hidden">
|
||||
<%= render DS::Pill.new(
|
||||
label: t("transactions.transfer_match.auto_matched_short"),
|
||||
tone: :neutral,
|
||||
marker: false,
|
||||
show_dot: false
|
||||
) %>
|
||||
</span>
|
||||
|
||||
<%= button_to transfer_path(transaction.transfer, transfer: { status: "confirmed" }),
|
||||
|
||||
Reference in New Issue
Block a user