From 359908caf5e76cdce1b010f74dca8b7b86cf515e Mon Sep 17 00:00:00 2001 From: Avery Felts Date: Sat, 24 Jan 2026 12:29:35 -0700 Subject: [PATCH] Style savings dialog with dark green theme and empty default values --- src/components/SavingsSetupDialog.tsx | 58 ++++++++++++++------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/src/components/SavingsSetupDialog.tsx b/src/components/SavingsSetupDialog.tsx index e797e1f..2c1a7cb 100644 --- a/src/components/SavingsSetupDialog.tsx +++ b/src/components/SavingsSetupDialog.tsx @@ -44,8 +44,8 @@ export function SavingsSetupDialog({ }: SavingsSetupDialogProps) { const [costPerUnit, setCostPerUnit] = useState(''); const [unitsPerDay, setUnitsPerDay] = useState(''); - const [currency, setCurrency] = useState('USD'); - const [substance, setSubstance] = useState<'nicotine' | 'weed'>('nicotine'); + const [currency, setCurrency] = useState(''); + const [substance, setSubstance] = useState<'nicotine' | 'weed' | ''>(''); const [savingsGoal, setSavingsGoal] = useState(''); const [goalName, setGoalName] = useState(''); @@ -60,8 +60,8 @@ export function SavingsSetupDialog({ } else { setCostPerUnit(''); setUnitsPerDay(''); - setCurrency('USD'); - setSubstance('nicotine'); + setCurrency(''); + setSubstance(''); setSavingsGoal(''); setGoalName(''); } @@ -90,18 +90,20 @@ export function SavingsSetupDialog({ const isValid = costPerUnit && unitsPerDay && + currency && + substance && parseFloat(costPerUnit) > 0 && parseFloat(unitsPerDay) > 0; return ( !isOpen && onClose()}> - + - + {existingConfig ? 'Edit Savings Tracker' : 'Set Up Savings Tracker'} - + Enter your usage costs to track how much you're saving @@ -109,10 +111,10 @@ export function SavingsSetupDialog({
{/* Substance Selection */}
- + - - + + {CURRENCIES.map((curr) => ( @@ -140,11 +142,11 @@ export function SavingsSetupDialog({ {/* Cost Per Unit */}
-
{/* Units Per Week */}
-
{/* Optional: Savings Goal */} -
-
+
+
See your real time savings:
- +
- + {CURRENCIES.find((c) => c.code === currency)?.symbol || '$'} setSavingsGoal(e.target.value)} - className="pl-8" + className="pl-8 border-emerald-700 bg-emerald-900/50 text-white placeholder:text-emerald-400" placeholder="500" />
- + setGoalName(e.target.value)} placeholder="e.g., New Phone, Vacation" + className="border-emerald-700 bg-emerald-900/50 text-white placeholder:text-emerald-400" />
{/* Actions */}
-