From 72fe19987957e78cbd1d97ccfd8b87d85fea5c88 Mon Sep 17 00:00:00 2001
From: Sebastien Castiel <sebastien@castiel.me>
Date: Wed, 6 Dec 2023 15:23:18 -0500
Subject: Add currency

---
 src/components/expense-form.tsx | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

(limited to 'src/components/expense-form.tsx')

diff --git a/src/components/expense-form.tsx b/src/components/expense-form.tsx
index 3202788..6420bc6 100644
--- a/src/components/expense-form.tsx
+++ b/src/components/expense-form.tsx
@@ -118,16 +118,19 @@ export function ExpenseForm({ group, expense, onSubmit, onDelete }: Props) {
               render={({ field }) => (
                 <FormItem className="order-2 sm:order-3">
                   <FormLabel>Amount</FormLabel>
-                  <FormControl>
-                    <Input
-                      className="text-base"
-                      type="number"
-                      min={0.01}
-                      step={0.01}
-                      placeholder="0.00"
-                      {...field}
-                    />
-                  </FormControl>
+                  <div className="flex items-baseline gap-2">
+                    <span>{group.currency}</span>
+                    <FormControl>
+                      <Input
+                        className="text-base max-w-[120px]"
+                        type="number"
+                        min={0.01}
+                        step={0.01}
+                        placeholder="0.00"
+                        {...field}
+                      />
+                    </FormControl>
+                  </div>
                   <FormDescription>Enter the expense amount.</FormDescription>
                   <FormMessage />
                 </FormItem>
-- 
cgit v1.3

