Skip to content

Commit 612280d

Browse files
committed
Upgrade dashboards and mobile layout
1 parent d99882b commit 612280d

9 files changed

Lines changed: 1721 additions & 897 deletions

File tree

web/components/BudgetView.tsx

Lines changed: 182 additions & 123 deletions
Large diffs are not rendered by default.

web/components/Dashboard.tsx

Lines changed: 286 additions & 212 deletions
Large diffs are not rendered by default.

web/components/Goals.tsx

Lines changed: 157 additions & 101 deletions
Large diffs are not rendered by default.

web/components/Reports.tsx

Lines changed: 216 additions & 194 deletions
Large diffs are not rendered by default.

web/components/Transactions.tsx

Lines changed: 300 additions & 131 deletions
Large diffs are not rendered by default.

web/components/investment/InvestUI.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ interface SectionTitleProps {
1919
}
2020

2121
export const SectionTitle: React.FC<SectionTitleProps> = ({ eyebrow, title, description, action }) => (
22-
<div className="flex items-start justify-between gap-4">
23-
<div>
22+
<div className="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
23+
<div className="min-w-0">
2424
{eyebrow && <p className="text-xs font-semibold uppercase tracking-[0.18em] text-blue-600 dark:text-blue-400">{eyebrow}</p>}
25-
<h2 className="text-xl font-bold text-gray-900 dark:text-white mt-1">{title}</h2>
26-
{description && <p className="text-sm text-gray-600 dark:text-gray-400 mt-1 max-w-2xl">{description}</p>}
25+
<h2 className="mt-1 break-words text-xl font-bold text-gray-900 dark:text-white">{title}</h2>
26+
{description && <p className="mt-1 max-w-2xl break-words text-sm text-gray-600 dark:text-gray-400">{description}</p>}
2727
</div>
28-
{action}
28+
{action && <div className="w-full shrink-0 sm:w-auto">{action}</div>}
2929
</div>
3030
);
3131

@@ -46,9 +46,9 @@ export const MetricPill: React.FC<MetricPillProps> = ({ label, value, tone = 'ne
4646
: 'bg-gray-50 text-gray-700 dark:bg-zinc-800 dark:text-gray-300 border-gray-200 dark:border-zinc-700';
4747

4848
return (
49-
<div className={`rounded-2xl border px-4 py-3 ${toneClass}`}>
50-
<p className="text-xs uppercase tracking-wide opacity-80">{label}</p>
51-
<p className="text-lg font-semibold mt-1">{value}</p>
49+
<div className={`min-w-0 rounded-2xl border px-4 py-3 ${toneClass}`}>
50+
<p className="break-words text-xs uppercase tracking-wide opacity-80">{label}</p>
51+
<p className="mt-1 break-words text-base font-semibold leading-tight sm:text-lg">{value}</p>
5252
</div>
5353
);
5454
};
@@ -84,15 +84,15 @@ interface ToggleProps {
8484
}
8585

8686
export const QuietToggle: React.FC<ToggleProps> = ({ label, description, checked, onChange }) => (
87-
<div className="flex items-center justify-between gap-4 py-3">
88-
<div>
87+
<div className="flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between">
88+
<div className="min-w-0">
8989
<p className="font-medium text-gray-900 dark:text-white">{label}</p>
9090
<p className="text-sm text-gray-600 dark:text-gray-400">{description}</p>
9191
</div>
9292
<button
9393
type="button"
9494
onClick={() => onChange(!checked)}
95-
className={`w-12 h-6 rounded-full transition-colors ${checked ? 'bg-blue-500' : 'bg-gray-300 dark:bg-zinc-700'}`}
95+
className={`h-6 w-12 shrink-0 rounded-full transition-colors ${checked ? 'bg-blue-500' : 'bg-gray-300 dark:bg-zinc-700'}`}
9696
>
9797
<div className={`w-5 h-5 mt-0.5 rounded-full bg-white transition-transform ${checked ? 'translate-x-6' : 'translate-x-0.5'}`} />
9898
</button>

0 commit comments

Comments
 (0)