import styles from "./styles.module.scss"

type InputProps = {
  name: string;
  type: 'textarea' | 'text' | 'email' | 'number'
  placeholder?: string
  rows?: number
}

export const Input = ({name, type, placeholder, rows = 5}: InputProps) => {
  if (type === 'textarea') {
    return (
      <textarea name={name} className={styles.input} placeholder={placeholder} rows={rows}>

      </textarea>
    )
  }

  return (
    <input
      className={styles.input}
      type={type}
      name={name}
      placeholder={placeholder}
    />
  )
}