-
-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathTextField.ts
More file actions
29 lines (26 loc) · 858 Bytes
/
TextField.ts
File metadata and controls
29 lines (26 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { ChangeEventHandler, HTMLAttributes, ReactNode, FC } from 'react';
import { CommonUIModule, Module } from '../webpack';
export interface TextFieldProps extends HTMLAttributes<HTMLInputElement> {
label?: ReactNode;
requiredLabel?: ReactNode;
description?: ReactNode;
disabled?: boolean;
bShowCopyAction?: boolean;
bShowClearAction?: boolean;
bAlwaysShowClearAction?: boolean;
bIsPassword?: boolean;
rangeMin?: number;
rangeMax?: number;
mustBeNumeric?: boolean;
mustBeURL?: boolean;
mustBeEmail?: boolean;
focusOnMount?: boolean;
tooltip?: string;
placeholder?: string;
inlineControls?: ReactNode;
onChange?: ChangeEventHandler<HTMLInputElement>;
value?: string;
}
export const TextField = Object.values(CommonUIModule).find(
(mod: Module) => mod?.validateUrl && mod?.validateEmail,
) as FC<TextFieldProps>;