import {ChangeEventHandler, forwardRef} from 'react'; import './style.scss'; interface InputProps { name?: string; value?: string; placeholder?: string; type?: string; onChange?: ChangeEventHandler; disabled?: boolean; label?: string; [x: string]: any; } const Input = forwardRef( ({name, value, placeholder, onChange, label, disabled = false, type = 'text', ...rest}, ref) => { const Input = () => ( ) if (label) { return ( ) } return Input(); }) export default Input