I think we should clean the typing here so that there are no duplications. For example, we should remove onFocus and onBlur as they are already available from React.InputHTMLAttributes<HTMLInputElement> in the form that we want. Also, onChange is required for our Input component however we should allow it to be optional which is how it is defined within React.InputHTMLAttributes<HTMLInputElement>. For example, some inputs might always be disabled so there is no need to define a onChange for them.
As we have a separate so that we disallow using
isDisabled
prop, we should omitdisabled
prop that comes from React.InputHTMLAttributesdisabled
as prop to Input component. Or removeisDisabled
in favour of usingdisabled
prop. https://github.com/Hipo/react-ui-toolkit/blob/master/src/form/input/Input.tsx#L8I think we should clean the typing here so that there are no duplications. For example, we should remove
onFocus
andonBlur
as they are already available fromReact.InputHTMLAttributes<HTMLInputElement>
in the form that we want. Also,onChange
is required for our Input component however we should allow it to be optional which is how it is defined withinReact.InputHTMLAttributes<HTMLInputElement>
. For example, some inputs might always be disabled so there is no need to define aonChange
for them.