I wrote a new component like the following code:
function CustomInput({ floatLabel, ...props }: any) {
return (
<label>
{floatLabel}
<input {...props} />
</label>
);
}
I want to provide Typescript IntelliSense for this element (An HTML input + new floatLabel
attribute )
<CustomInput floatLabel="x" type="input" /> // I need full IntelliSense for this element.
Just like other standard HTML tags.
How to provide full IntelliSense by extending TS Types as a standard HTML input with a new floatLabel
attribute for <CustomInput>
?