File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
refactor/src/components/Input Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -5,27 +5,27 @@ interface ICustomValidation {
5
5
minlength ?: number ;
6
6
}
7
7
8
- interface Errors { }
8
+ interface IErrors { }
9
9
10
10
export interface IInputRootObject {
11
11
inputLabel : string ;
12
12
inputName : string ;
13
13
customValidation : ICustomValidation ;
14
- errors : Errors ;
14
+ errors : IErrors ;
15
15
register : UseFormRegister < FieldValues > ;
16
16
type ?: string ;
17
17
}
18
18
19
19
/**
20
20
* Input field component displays a text input in a form, with label.
21
21
* The various properties of the input field can be determined with the props:
22
- * @param {Object } [customValidation] - the validation rules to apply to the input field
23
- * @param {Object } errors - the form errors object provided by react-hook-form
22
+ * @param {ICustomValidation } [customValidation] - the validation rules to apply to the input field
23
+ * @param {IErrors } errors - the form errors object provided by react-hook-form
24
24
* @param {string } inputLabel - used for the display label
25
25
* @param {string } inputName - the key of the value in the submitted data. Must be unique
26
26
* @param {UseFormRegister<FieldValues> } register - register function from react-hook-form
27
27
* @param {boolean } [required=true] - whether or not this field is required. default true
28
- * @param {'text'|'number' } [type='text'] - the input type. defaults to text
28
+ * @param {string } [type='text'] - the input type. defaults to text
29
29
*/
30
30
export const InputField = ( {
31
31
customValidation,
You can’t perform that action at this time.
0 commit comments