From 0544b8358af68df87dbc472221d8c0842c2b2db0 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 19 May 2023 13:26:47 -0300
Subject: accounts and notifications

---
 packages/exchange-backoffice-ui/src/handlers/InputLine.tsx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'packages/exchange-backoffice-ui/src/handlers/InputLine.tsx')

diff --git a/packages/exchange-backoffice-ui/src/handlers/InputLine.tsx b/packages/exchange-backoffice-ui/src/handlers/InputLine.tsx
index 255654949..32b16313d 100644
--- a/packages/exchange-backoffice-ui/src/handlers/InputLine.tsx
+++ b/packages/exchange-backoffice-ui/src/handlers/InputLine.tsx
@@ -23,7 +23,7 @@ interface StringConverter<T> {
 }
 
 export interface UIFormProps<T> {
-  name: string;
+  name: keyof T;
   label: TranslatedString;
   placeholder?: TranslatedString;
   tooltip?: TranslatedString;
@@ -181,7 +181,11 @@ function defaultFromString(v: string) {
   return v;
 }
 
-export function InputLine<T>(props: { type: string } & UIFormProps<T>): VNode {
+type InputType = "text" | "text-area" | "password" | "email";
+
+export function InputLine<T>(
+  props: { type: InputType } & UIFormProps<T>,
+): VNode {
   const { name, placeholder, before, after, converter, type } = props;
   const { value, onChange, state, isDirty } = useField(name);
 
-- 
cgit v1.2.3

