-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathformType.ts
More file actions
51 lines (45 loc) · 1.1 KB
/
formType.ts
File metadata and controls
51 lines (45 loc) · 1.1 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { ChangeEventHandler, KeyboardEventHandler } from "react";
import { inputFileSize } from "@/components/input/InputFile";
type Size = keyof typeof inputFileSize.size;
export interface InputProps extends textAreaProps {
id?: string;
label?: string;
value?: string | never[];
placeholder?: string;
errors?: string;
type?: string;
name?: string;
autoComplete?: string;
className?: string;
tag?: string;
size?: string;
readOnly?: boolean;
onChange?: ChangeEventHandler;
onKeyDown?: KeyboardEventHandler;
}
export interface textAreaProps {
isTextArea?: boolean;
isButton?: boolean;
}
export interface InputFileProps {
label: string;
id: string;
name: string;
value: string | File | null;
size: Size;
onChange: (file: File | null | string) => void;
}
export interface InputDateProps {
id: string;
label: string;
value: string | any;
placeholder: string;
onChange: (date: string) => void;
}
export interface InputTagProps {
tags: string[];
tagInput: string;
onKeyDown: KeyboardEventHandler;
onClick: (tag: string) => void;
onChange: ChangeEventHandler;
}