"use client";


import { Input, Typography } from "antd";
type propsType = {
    label: string,
    placeholder?: string,
    disabled?: boolean,
    required?: boolean,
    className?: string,
    onChange?: any,
    value?: string,
    type?: any,
    onBlur?: any,
    onFocus?: any,
    rows?: number
}
export default function BATextarea(props: propsType) {
    const { label, placeholder, disabled, required, onChange, value, onBlur, onFocus, rows } = props;

    const { TextArea } = Input;

    return <>
        {label && <Typography.Title level={5}>{label}{required && "*"}</Typography.Title>}
        <TextArea
            {...props}
            onBlur={onBlur}
            onFocus={onFocus}
            rows={rows || 4}
            value={value}
            placeholder={placeholder}
            disabled={disabled}
            required={required}
            onChange={onChange}
        />
    </>
}
