feat(03-01): add CSS animation tokens, i18n keys, and carryover display
- Add collapsible-open/close keyframes and CSS animation tokens to index.css - Add dashboard.sections and dashboard.carryoverIncludes keys to en.json and de.json - Add optional subtitle/subtitleClassName props to StatCard - Extend SummaryStrip balance prop with carryoverSubtitle/carryoverIsNegative - Compute and pass carryover subtitle from DashboardContent to SummaryStrip
This commit is contained in:
@@ -124,6 +124,12 @@ function DashboardContent({ budgetId }: { budgetId: string }) {
|
||||
const currency = budget.currency
|
||||
const availableBalance = totalIncome - totalExpenses + budget.carryover_amount
|
||||
|
||||
const carryover = budget.carryover_amount
|
||||
const carryoverSubtitle = carryover !== 0
|
||||
? t("dashboard.carryoverIncludes", { amount: formatCurrency(Math.abs(carryover), currency) })
|
||||
: undefined
|
||||
const carryoverIsNegative = carryover < 0
|
||||
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
{/* Summary cards */}
|
||||
@@ -139,6 +145,8 @@ function DashboardContent({ budgetId }: { budgetId: string }) {
|
||||
balance={{
|
||||
value: formatCurrency(availableBalance, currency),
|
||||
isPositive: availableBalance >= 0,
|
||||
carryoverSubtitle,
|
||||
carryoverIsNegative,
|
||||
}}
|
||||
t={t}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user