wallet-core/packages/taler-wallet-webextension/src/mui/handlers.ts

27 lines
525 B
TypeScript
Raw Normal View History

2022-04-22 21:10:21 +02:00
import { TalerError } from "@gnu-taler/taler-wallet-core";
export interface TextFieldHandler {
onInput: (value: string) => Promise<void>;
value: string;
error?: string;
}
export interface ButtonHandler {
onClick?: () => Promise<void>;
error?: TalerError;
}
2022-04-27 19:33:52 +02:00
export interface ToggleHandler {
value?: boolean;
button: ButtonHandler;
}
2022-04-22 21:10:21 +02:00
export interface SelectFieldHandler {
onChange: (value: string) => Promise<void>;
error?: string;
value: string;
isDirty?: boolean;
list: Record<string, string>;
}