import React, { ChangeEvent } from 'react'

export default function TextAreaInput({
  text,
  name,
  placeholder,
  onchange,
  value,
}: {
  text: string
  name: string
  placeholder: string
  onchange: (name: string, event: ChangeEvent<{ value: string }>) => void
  value: string
}) {
  return (
    <label>
      {text}
      <textarea className={name} placeholder={placeholder} onChange={onchange.bind(null, name)} value={value} />
    </label>
  )
}
