import * as React from 'react'; import { Sizes, Colors, Variants } from '../../styles'; import { StyledInputContainer, StyledTextInput, StyledLabel, StyledInputError } from './styled-text-input'; interface Props { label?: React.ReactNode; name: string; color: Colors; size: Sizes; variant: Variants; value?: string | number; onChange: (e: { target: { value: string} }) => void; type: 'text' | 'number' | 'password' | 'date'; error?: string; placeholder?: string; onKeyPress?: any; style?: React.CSSProperties; onSelect?: any; fullWidth?: boolean; ref?: any; readOnly?: boolean; } const TextInput = (props: Props) => ( {props.label && {props.label} } {props.error} ); TextInput.defaultProps = { size: 'md', color: 'primary', variant: 'outlined', type: 'text', onChange: (e: any) => {}, }; export default TextInput;