feat(textfield): extract TextField component

This commit is contained in:
Jonas Dellinger
2022-06-05 15:06:06 +02:00
parent fccfdd6f11
commit a3c1a7c7b7
2 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
import { ChangeEventHandler, ReactNode, VFC } from 'react';
import { CommonUIModule, Module } from '../webpack';
export interface TextFieldProps {
label?: ReactNode;
requiredLabel?: ReactNode;
description?: ReactNode;
bShowCopyAction?: boolean;
bShowClearAction?: boolean;
bAlwaysShowClearAction?: boolean;
bIsPassword?: boolean;
rangeMin?: number;
rangeMax?: number;
mustBeNumeric?: boolean;
mustBeURL?: boolean;
mustBeEmail?: boolean;
focusOnMount?: boolean;
tooltip?: string;
inlineControls?: ReactNode;
onChange?(event: ChangeEventHandler<HTMLInputElement>): void;
value?: string;
}
export const TextField = Object.values(CommonUIModule).find(
(mod: Module) => mod?.validateUrl && mod?.validateEmail,
) as VFC<TextFieldProps>;
console.log(TextField);