import React from 'react';
import cx from 'classnames';

interface InputProps {
  filled?: boolean;
  extraClass?: string;
  value?:string | number | string[];
  onChange?:React.ChangeEventHandler<HTMLInputElement>;
  name?: string;
}

const Input = ({ extraClass, filled, value, onChange, name }: InputProps) => (
  <input 
    className={cx('c-input', {
      'c-input--filled': filled,
    }, extraClass)} 
    value={value}
    onChange={onChange}
    name={name}/>
);

export default Input;
