From c680f5aa71b08e978444df07f93c381f9d47ab82 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 5 Jun 2023 10:04:09 -0300 Subject: rename aml --- .../src/handlers/InputAmount.tsx | 34 ---------------------- 1 file changed, 34 deletions(-) delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputAmount.tsx (limited to 'packages/exchange-backoffice-ui/src/handlers/InputAmount.tsx') diff --git a/packages/exchange-backoffice-ui/src/handlers/InputAmount.tsx b/packages/exchange-backoffice-ui/src/handlers/InputAmount.tsx deleted file mode 100644 index 9be9dd4d0..000000000 --- a/packages/exchange-backoffice-ui/src/handlers/InputAmount.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { AmountJson, Amounts, TranslatedString } from "@gnu-taler/taler-util"; -import { VNode, h } from "preact"; -import { InputLine, UIFormProps } from "./InputLine.js"; -import { useField } from "./useField.js"; - -export function InputAmount( - props: { currency?: string } & UIFormProps, -): VNode { - const { value } = useField(props.name); - const currency = - !value || !(value as any).currency - ? props.currency - : (value as any).currency; - return ( - - type="text" - before={{ - type: "text", - text: currency as TranslatedString, - }} - converter={{ - //@ts-ignore - fromStringUI: (v): AmountJson => { - return Amounts.parseOrThrow(`${currency}:${v}`); - }, - //@ts-ignore - toStringUI: (v: AmountJson) => { - return v === undefined ? "" : Amounts.stringifyValue(v); - }, - }} - {...props} - /> - ); -} -- cgit v1.2.3