// client/src/components/SidePanel/Parameters/DynamicTextarea.tsx import React from 'react'; import { Controller, useFormContext } from 'react-hook-form'; import { Label, TextareaAutosize, HoverCard, HoverCardTrigger } from '~/components/ui'; import { useLocalize } from '~/hooks'; import { cn, defaultTextProps } from '~/utils'; import OptionHover from './OptionHover'; import { ESide } from '~/common'; import type { DynamicSettingProps } from 'librechat-data-provider'; function DynamicTextarea({ label = '', settingKey, defaultValue, description = '', columnSpan, placeholder = '', readonly = false, showDefault = true, labelCode, descriptionCode, placeholderCode, }: DynamicSettingProps) { const localize = useLocalize(); const { control } = useFormContext(); return (
( field.onChange(e.target.value)} placeholder={ placeholderCode === true ? localize(placeholder) ?? placeholder : placeholder } className={cn( defaultTextProps, 'flex max-h-[138px] min-h-[100px] w-full resize-none px-3 py-2', )} /> )} />
{description && ( )}
); } export default DynamicTextarea;