import React from 'react';
import uniqid from 'uniqid';

const Textarea = ({ className, label, labelClasses, name, errors, validation, register, ...props }) => {

    const uid = uniqid();

    return (
        <div className='flex flex-col w-full'>
            {label &&
                <label className={['mb-3 text-white', labelClasses].join(' ')} htmlFor={uid}>{label}</label>
            }
            <textarea  {...register && name ? {...register(name)} : null} id={uid} className={['bg-white rounded-md py-2.5 px-5 text-base text-gray-800', className].join(' ')} {...props}></textarea>
        </div>
    );
}

export default Textarea;
