Created
October 23, 2022 07:17
-
-
Save koss-lebedev/4279eab61f1a71f488ce0cd548daa416 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Props = InputHTMLAttributes<HTMLInputElement> | |
const Input = (props: Props) => { /* ... */ } | |
const CharCountInput = (props: Props) => { | |
return ( | |
<div> | |
<Input {...props} /> | |
<span>Char count: {props.value.length}</span> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment