import { useEffect, useState } from "react" import * as React from "react" type TextAreaProps = { labelTitle?: string; labelStyle?: string; containerStyle?: string; dataField?: string; inputStyle?: string; defaultValue: string; placeholder?: string; updateFormValue?: (value: string) => void; } function TextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps) { const [value, setValue] = useState(defaultValue) useEffect(() => { setValue(defaultValue) }, [defaultValue]) const updateInputValue = (val: string) => { setValue(val) if (updateFormValue) updateFormValue(val) } return (
{labelTitle ? : ""}
) } export default TextAreaInput