Created
March 30, 2021 11:29
-
-
Save evasconcelos/27f62bc757a89b0b15e9235bd84edd07 to your computer and use it in GitHub Desktop.
open closed bad example
This file contains hidden or 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
import React, { FC } from "react"; | |
interface InputProps { | |
value: string; | |
onChange: React.ChangeEventHandler<HTMLInputElement>; | |
className?: string; | |
label: string; | |
} | |
const Input: FC<InputProps> = ({ label, ...props }) => { | |
return ( | |
<div> | |
<label>{label}</label> | |
<input {...props} /> | |
</div> | |
); | |
}; | |
export default Input; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment