diff options
author | Sebastian <sebasjm@gmail.com> | 2024-05-10 11:00:14 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-05-10 11:00:14 -0300 |
commit | 224bbb1d99a7f12a95322a4abb6a5e8f05fca68b (patch) | |
tree | 9426f4e26666d3f0ec2a0793b22f29439d40ad21 /packages/web-util/src/forms/InputAmount.tsx | |
parent | 2375c1c1c8095b4d38dd2afa878705ad3bb216e1 (diff) | |
download | wallet-core-224bbb1d99a7f12a95322a4abb6a5e8f05fca68b.tar.xz |
fixing time and currency input
Diffstat (limited to 'packages/web-util/src/forms/InputAmount.tsx')
-rw-r--r-- | packages/web-util/src/forms/InputAmount.tsx | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/packages/web-util/src/forms/InputAmount.tsx b/packages/web-util/src/forms/InputAmount.tsx index e8683468e..647d2c823 100644 --- a/packages/web-util/src/forms/InputAmount.tsx +++ b/packages/web-util/src/forms/InputAmount.tsx @@ -18,25 +18,26 @@ export function InputAmount<T extends object, K extends keyof T>( : (value as any).currency; return ( <InputLine<T, K> + {...props} type="text" before={{ type: "text", text: currency as TranslatedString, }} - //@ts-ignore - converter={ props.converter ?? { - - fromStringUI: (v): AmountJson => { - return ( - Amounts.parse(`${currency}:${v}`) ?? - Amounts.zeroOfCurrency(currency) - ); - }, - toStringUI: (v: AmountJson) => { - return v === undefined ? "" : Amounts.stringifyValue(v); - }, - }} - {...props} + //@ts-ignore + converter={ + props.converter ?? { + fromStringUI: (v): AmountJson => { + return ( + Amounts.parse(`${currency}:${v}`) ?? + Amounts.zeroOfCurrency(currency) + ); + }, + toStringUI: (v: AmountJson) => { + return v === undefined ? "" : Amounts.stringifyValue(v); + }, + } + } /> ); } |