Skip to content

Instantly share code, notes, and snippets.

@evasconcelos
Created March 30, 2021 11:29
Show Gist options
  • Save evasconcelos/27f62bc757a89b0b15e9235bd84edd07 to your computer and use it in GitHub Desktop.
Save evasconcelos/27f62bc757a89b0b15e9235bd84edd07 to your computer and use it in GitHub Desktop.
open closed bad example
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