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