aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-04-11 11:36:32 -0300
committerSebastian <sebasjm@gmail.com>2022-04-11 11:36:38 -0300
commitccb50c636054819f5af8778cc3ebe5258b1c2e87 (patch)
tree750f28869e1ebb5f1f52248d83671b13e4c89f09 /packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx
parente09ed46675047d97d4f3d4237c23f6365eba6534 (diff)
downloadwallet-core-ccb50c636054819f5af8778cc3ebe5258b1c2e87.tar.xz
new test api to test hooks rendering iteration, testing state of withdraw page
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx19
1 files changed, 8 insertions, 11 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx
index 215aa4378..b9d398915 100644
--- a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx
@@ -21,6 +21,7 @@
*/
import { AmountJson, Amounts } from "@gnu-taler/taler-util";
+import { TalerError } from "@gnu-taler/taler-wallet-core";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { ErrorMessage } from "../components/ErrorMessage.js";
@@ -60,10 +61,17 @@ export interface TextFieldHandler {
error?: string;
}
+export interface ButtonHandler {
+ onClick: () => Promise<void>;
+ disabled?: boolean;
+ error?: TalerError;
+}
+
export interface SelectFieldHandler {
onChange: (value: string) => void;
error?: string;
value: string;
+ isDirty?: boolean;
list: Record<string, string>;
}
@@ -139,17 +147,6 @@ export function useComponentState(
};
}
-export interface InputHandler {
- value: string;
- onInput: (s: string) => void;
-}
-
-export interface SelectInputHandler {
- list: Record<string, string>;
- value: string;
- onChange: (s: string) => void;
-}
-
export function CreateManualWithdraw({
initialAmount,
exchangeUrlWithCurrency,