@@ -4,7 +4,33 @@ import Edit from 'widgets/Icons/Edit.svg?react'
44import { EyesClose , EyesOpen } from 'widgets/Icons/icon'
55import styles from './textField.module.scss'
66
7- const TextField = React . forwardRef (
7+ const TextField = React . forwardRef <
8+ HTMLDivElement ,
9+ {
10+ field : string
11+ label ?: string | React . ReactNode
12+ value ?: string
13+ hint ?: string
14+ error ?: string
15+ type ?: 'text' | 'password' | 'file'
16+ onChange ?: ( e : React . ChangeEvent < HTMLInputElement | HTMLTextAreaElement > ) => void
17+ onClick ?: ( e : React . SyntheticEvent < HTMLInputElement | HTMLTextAreaElement > ) => void
18+ className ?: string
19+ prefix ?: string | React . ReactNode | undefined
20+ suffix ?: string | React . ReactNode | undefined
21+ stack ?: boolean
22+ required ?: boolean
23+ readOnly ?: boolean
24+ placeholder ?: string
25+ disabled ?: boolean
26+ selected ?: boolean
27+ width ?: string
28+ rows ?: number
29+ errorWithIcon ?: boolean
30+ tabIndex ?: number
31+ [ key : string ] : any
32+ }
33+ > (
834 (
935 {
1036 label,
@@ -28,31 +54,8 @@ const TextField = React.forwardRef(
2854 rows = 1 ,
2955 errorWithIcon = false ,
3056 ...rest
31- } : {
32- field : string
33- label ?: string | React . ReactNode
34- value ?: string
35- hint ?: string
36- error ?: string
37- type ?: 'text' | 'password' | 'file'
38- onChange ?: ( e : React . ChangeEvent < HTMLInputElement | HTMLTextAreaElement > ) => void
39- onClick ?: ( e : React . SyntheticEvent < HTMLInputElement | HTMLTextAreaElement > ) => void
40- className ?: string
41- prefix ?: string | React . ReactNode | undefined
42- suffix ?: string | React . ReactNode | undefined
43- stack ?: boolean
44- required ?: boolean
45- readOnly ?: boolean
46- placeholder ?: string
47- disabled ?: boolean
48- selected ?: boolean
49- [ key : string ] : any
50- width ?: string
51- rows ?: number
52- errorWithIcon ?: boolean
53- tabIndex ?: number
5457 } ,
55- ref : React . LegacyRef < HTMLDivElement >
58+ ref
5659 ) => {
5760 const [ isPasswordHidden , setIsPasswordHidden ] = useState ( true )
5861 const inputRef = useRef < ( HTMLTextAreaElement & HTMLInputElement ) | null > ( null )
0 commit comments