Merge pull request #11 from asolpshinning/patch-1
Updated ChatInput.tsx text area to autoextend for larger prompt size
This commit is contained in:
commit
fe7d1a6ab2
|
@ -56,7 +56,14 @@ export const ChatInput: FC<Props> = ({ onSend, messageIsStreaming }) => {
|
||||||
<textarea
|
<textarea
|
||||||
ref={textareaRef}
|
ref={textareaRef}
|
||||||
className="rounded-lg pl-4 pr-8 py-3 w-full focus:outline-none max-h-[280px] dark:bg-[#40414F] dark:border-opacity-50 dark:border-neutral-800 dark:text-neutral-100 border border-neutral-300 shadow text-neutral-900"
|
className="rounded-lg pl-4 pr-8 py-3 w-full focus:outline-none max-h-[280px] dark:bg-[#40414F] dark:border-opacity-50 dark:border-neutral-800 dark:text-neutral-100 border border-neutral-300 shadow text-neutral-900"
|
||||||
style={{ resize: "none", bottom: `${textareaRef?.current?.scrollHeight}px` }}
|
style={{
|
||||||
|
resize: "none",
|
||||||
|
bottom: `${textareaRef?.current?.scrollHeight}px`,
|
||||||
|
height: 'auto',
|
||||||
|
minHeight: '100px',
|
||||||
|
maxHeight: '400px',
|
||||||
|
overflow: 'auto',
|
||||||
|
}}
|
||||||
placeholder="Type a message..."
|
placeholder="Type a message..."
|
||||||
value={content}
|
value={content}
|
||||||
rows={1}
|
rows={1}
|
||||||
|
|
Loading…
Reference in New Issue