Add currency

This commit is contained in:
Sebastien Castiel
2023-12-06 15:23:18 -05:00
parent 570aa713b1
commit 72fe199879
7 changed files with 49 additions and 13 deletions

View File

@@ -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>