Closed kopecmi8 closed 2 years ago
Different input types has different props. Now its little bit tricky to pass standard attributes for specific input type to Input control component.
I think Input control component should export specific interfaces for standard types.
For example, Input of type number by documentation has these specific attributes
To do it we should add interface like this
export interface InputNumberProps { min?: number; max?: number; step?: number; }
Second example for input type "password"
export interface InputPasswordProps { autocomplete?: string; inputmode?: string; maxlength?: number; minlength?: number; pattern?: string; }
We should also think about usage
<Input<any, InputPasswordProps> type="password" autocomplete="new-password" disabled={disabled} />
Now its little bit tricky because first required attribute is TTarget not the TOtherProps.
TTarget
TOtherProps
There is problem with size props wich specify both FormControlProps and React.InputHTMLAttributes<FormControlElement> differently once as 'sm' | 'lg' second time as number.
size
FormControlProps
React.InputHTMLAttributes<FormControlElement>
Different input types has different props. Now its little bit tricky to pass standard attributes for specific input type to Input control component.
I think Input control component should export specific interfaces for standard types.
For example, Input of type number by documentation has these specific attributes
To do it we should add interface like this
Second example for input type "password"
We should also think about usage
Now its little bit tricky because first required attribute is
TTarget
not theTOtherProps
.