diff --git a/src/components/dashboard/SummaryCard.tsx b/src/components/dashboard/SummaryCard.tsx index 468dff2..a89dc2a 100644 --- a/src/components/dashboard/SummaryCard.tsx +++ b/src/components/dashboard/SummaryCard.tsx @@ -6,6 +6,7 @@ import { cn } from '@/lib/utils'; interface SummaryCardProps { title: string; value: string; + secondaryValue?: string; icon: React.ReactNode; trend?: number; className?: string; @@ -16,6 +17,7 @@ interface SummaryCardProps { const SummaryCard: React.FC = ({ title, value, + secondaryValue, icon, trend, className, @@ -41,6 +43,9 @@ const SummaryCard: React.FC = ({

{title}

{value}

+ {secondaryValue && ( +

{secondaryValue}

+ )}
diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index a08b660..e6ee348 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -5,7 +5,7 @@ import SummaryCard from '@/components/dashboard/SummaryCard'; import TransactionsTable from '@/components/dashboard/TransactionsTable'; import CategoryChart from '@/components/dashboard/CategoryChart'; import MonthlyChart from '@/components/dashboard/MonthlyChart'; -import { Wallet, ArrowUp, ArrowDown, PiggyBank } from 'lucide-react'; +import { Wallet, ArrowUp, ArrowDown, PiggyBank, Percent, DollarSign } from 'lucide-react'; import { Transaction, CategorySummary, MonthlyData } from '@/types/financialTypes'; import { useToast } from "@/components/ui/use-toast"; import { getTransacoes, getTransactionSummary, getCategorySummary, getMonthlyData } from '@/services/transacaoService'; @@ -120,6 +120,7 @@ const Dashboard = () => { 0 ? ((totals.saldo / totals.receitas) * 100).toFixed(1) : 0}%`} + secondaryValue={formatCurrency(totals.saldo)} icon={} iconClass="bg-finance-purple/10" valueClass="text-finance-purple"