import React from "react"; import { useController } from "react-hook-form"; type Props = { id: string; title: string; placeholder: string; description?: string; control?: any; required?: boolean; }; const TextAreaWithTitle: React.FC = ({ id, title, placeholder, description, control, required = false, }) => { const { field } = useController({ name: id, control: control, rules: { required: required }, }); return (
{description && (

{description}

)}