(openai) Show textarea instead of text input for message content

This commit is contained in:
Baptiste Arnaud
2023-03-29 10:58:26 +02:00
parent 84cdf4e934
commit 50db9985c4
3 changed files with 9 additions and 3 deletions

View File

@@ -22,6 +22,7 @@ type Props = {
moreInfoTooltip?: string
withVariableButton?: boolean
isRequired?: boolean
placeholder?: string
onChange: (value: string) => void
} & Pick<TextareaProps, 'minH'>
@@ -32,8 +33,10 @@ export const Textarea = ({
debounceTimeout = 1000,
label,
moreInfoTooltip,
placeholder,
withVariableButton = true,
isRequired,
minH,
}: Props) => {
const inputRef = useRef<HTMLTextAreaElement | null>(null)
const [isTouched, setIsTouched] = useState(false)
@@ -89,6 +92,8 @@ export const Textarea = ({
value={localValue}
onBlur={updateCarretPosition}
onChange={(e) => changeValue(e.target.value)}
placeholder={placeholder}
minH={minH}
/>
)