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/InputChoiceStacked.tsx | 111 --------------------- 1 file changed, 111 deletions(-) delete mode 100644 packages/exchange-backoffice-ui/src/handlers/InputChoiceStacked.tsx (limited to 'packages/exchange-backoffice-ui/src/handlers/InputChoiceStacked.tsx') diff --git a/packages/exchange-backoffice-ui/src/handlers/InputChoiceStacked.tsx b/packages/exchange-backoffice-ui/src/handlers/InputChoiceStacked.tsx deleted file mode 100644 index c37984368..000000000 --- a/packages/exchange-backoffice-ui/src/handlers/InputChoiceStacked.tsx +++ /dev/null @@ -1,111 +0,0 @@ -import { TranslatedString } from "@gnu-taler/taler-util"; -import { Fragment, VNode, h } from "preact"; -import { LabelWithTooltipMaybeRequired, UIFormProps } from "./InputLine.js"; -import { useField } from "./useField.js"; - -export interface Choice { - label: TranslatedString; - description?: TranslatedString; - value: V; -} - -export function InputChoiceStacked( - props: { - choices: Choice[]; - } & UIFormProps, -): VNode { - const { - choices, - name, - label, - tooltip, - help, - placeholder, - required, - before, - after, - converter, - } = props; - const { value, onChange, state, isDirty } = useField(name); - if (state.hidden) { - return ; - } - - return ( -
- -
-
- {choices.map((choice) => { - // const currentValue = !converter - // ? choice.value - // : converter.fromStringUI(choice.value) ?? ""; - - let clazz = - "border relative block cursor-pointer rounded-lg bg-white px-6 py-4 shadow-sm focus:outline-none sm:flex sm:justify-between"; - if (choice.value === value) { - clazz += - " border-transparent border-indigo-600 ring-2 ring-indigo-600"; - } else { - clazz += " border-gray-300"; - } - - return ( - - ); - })} -
-
- {help && ( -

- {help} -

- )} -
- ); -} -- cgit v1.2.3