Files
sure/test/components/previews/DS/selectable_card_preview.rb
Guillem Arias ec023cfe71 feat(retirement): PR4c DS::SelectableCard + bucket restyle
DS::SelectableCard — a checkbox rendered as a selectable card (whole card
toggles; brand-accent border + bg-surface when selected via peer-checked
on the sibling). Submits like a normal checkbox, so the bucket's
replace-all form is unchanged. Lookbook preview + component test.

Retirement bucket now renders each account as a DS::SelectableCard
(name · type · balance) instead of a bare checkbox row. Money stays
privacy-sensitive.
2026-05-29 12:36:53 +02:00

14 lines
339 B
Ruby

class DS::SelectableCardPreview < ViewComponent::Preview
# @param checked toggle
def default(checked: true)
render DS::SelectableCard.new(
name: "bucket[account_ids][]",
value: "abc",
title: "Vanguard FTSE All-World (VWCE)",
subtitle: "ETF",
amount: "$115,000",
checked: checked
)
end
end