configurable Dashboard.tsx

This commit is contained in:
2026-04-25 13:21:34 +05:30
parent 67d4c85146
commit a36d9119bb
6 changed files with 262 additions and 111 deletions

60
src/dashboard-config.ts Normal file
View File

@@ -0,0 +1,60 @@
import HistoryChart from "./components/HistoryChart";
import ProgressCard from "./components/ProgressCard";
import LatestItems from "./components/LatestItems";
import { DashboardConfig } from "./components/Dashboard";
export const configuration: DashboardConfig = {
sections: [
{
id: "breakdown",
title: "Breakdown",
summary: "Interactive chronological tracking",
component: HistoryChart,
dataKey: "chartData",
settings: {
tabs: ["Daily", "Weekly", "Monthly"],
},
style: {
size: 12,
},
},
{
id: "top-payees",
title: 'Top Payees',
component: ProgressCard,
dataKey: "topPayees",
isList: true,
settings: {
compact: true,
},
style: {
size: 12,
},
},
{
id: "latest",
title: 'Recent Transactions',
component: LatestItems,
dataKey: "latest",
style: {
size: 12,
},
},
],
style: {
palette: {
expense: {
primary: "#d32f2f",
light: "#fdecea",
dark: "#9a0007",
text: "#b71c1c"
},
income: {
primary: "#2e7d32",
light: "#e8f5e9",
dark: "#1b5e20",
text: "#1b5e20"
}
}
}
};