whisper-money/resources/js/components/dashboard
Víctor Falcón 30d64f8249
refactor: use shared trend indicator components with hover tooltips (#18)
## Summary

Refactored all places using TrendingUp/TrendingDown icons directly to
use the shared `AmountTrendIndicator` and `PercentageTrendIndicator`
components.

<img width="1113" height="799" alt="image"
src="https://github.com/user-attachments/assets/8a635d23-3c14-48b6-80d0-b5641af93024"
/>

## Changes

- **AmountTrendIndicator**: Now shows percentage diff on hover via
tooltip
- **PercentageTrendIndicator**: Now shows amount diff on hover via
tooltip
- Added `invertColors` prop to `PercentageTrendIndicator` for spending
categories (where spending less is good)
- Added `className` prop to both components for flexibility

## Files refactored

- `account-list-card.tsx` - Now uses `AmountTrendIndicator`
- `top-categories-card.tsx` - Now uses `PercentageTrendIndicator`
- `account-balance-chart.tsx` - Removed local `TrendIndicator` function,
now uses shared `PercentageTrendIndicator`
- `account-balance-card.tsx` - Updated to pass new props
- `net-worth-chart.tsx` - Updated to pass new props

## Testing

- All existing tests pass
- Hover over any trend indicator to see the alternate metric (percentage
or amount)
2025-12-08 17:31:22 +01:00
..
account-balance-card.tsx refactor: use shared trend indicator components with hover tooltips (#18) 2025-12-08 17:31:22 +01:00
account-type-icon.tsx Accounts: Allow users to create custom banks with his own logo, and name (#12) 2025-12-04 15:24:04 +01:00
amount-trend-indicator.tsx refactor: use shared trend indicator components with hover tooltips (#18) 2025-12-08 17:31:22 +01:00
net-worth-chart.tsx refactor: use shared trend indicator components with hover tooltips (#18) 2025-12-08 17:31:22 +01:00
percentage-trend-indicator.tsx refactor: use shared trend indicator components with hover tooltips (#18) 2025-12-08 17:31:22 +01:00
stat-card.tsx Fix CI: Update bun.lock and fix linting errors 2025-12-01 15:16:06 +01:00
top-categories-card.tsx refactor: use shared trend indicator components with hover tooltips (#18) 2025-12-08 17:31:22 +01:00