summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/components/AmountField.stories.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/components/AmountField.stories.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/components/AmountField.stories.tsx8
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/taler-wallet-webextension/src/components/AmountField.stories.tsx b/packages/taler-wallet-webextension/src/components/AmountField.stories.tsx
index 61c4a7661..f253d1996 100644
--- a/packages/taler-wallet-webextension/src/components/AmountField.stories.tsx
+++ b/packages/taler-wallet-webextension/src/components/AmountField.stories.tsx
@@ -20,12 +20,10 @@
*/
import { AmountJson, Amounts } from "@gnu-taler/taler-util";
-import { styled } from "@linaria/react";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { useTranslationContext } from "../context/translation.js";
-import { Grid } from "../mui/Grid.js";
-import { AmountFieldHandler, TextFieldHandler } from "../mui/handlers.js";
+import { AmountFieldHandler, nullFunction, withSafe } from "../mui/handlers.js";
import { AmountField } from "./AmountField.js";
export default {
@@ -39,9 +37,9 @@ function RenderAmount(): VNode {
const handler: AmountFieldHandler = {
value: value ?? Amounts.zeroOfCurrency("USD"),
- onInput: async (e) => {
+ onInput: withSafe(async (e) => {
setValue(e);
- },
+ }, nullFunction),
error,
};
const { i18n } = useTranslationContext();