import React from "react"; import "./Input.scss"; interface Props extends React.AllHTMLAttributes { name: string; type: string; error?: string; label: string; value: string; onValueChange?: (name: string, value: string) => void; onBlur?: (e: React.FocusEvent) => void; } class Input extends React.Component { renderText(props: Props) { const inputClassName = props.error ? "input-error" : ""; const pp = { ...props }; delete pp.onValueChange; return (
); } renderRadio(props: Props) { const inputClassName = props.error ? "input-error" : ""; const pp = { ...props }; delete pp.onValueChange; return (
); } renderTextArea(props: Props) { const inputClassName = props.error ? "input-error" : ""; const pp = { ...props }; delete pp.onValueChange; return (