nit: remove input accessories that dont exist yet

This commit is contained in:
0xSage 2023-10-13 16:35:28 +08:00
parent ca527fe352
commit c01640412b
2 changed files with 7 additions and 8 deletions

View File

@ -1,7 +1,7 @@
"use client"; "use client";
import { useSetAtom } from "jotai"; import { useSetAtom } from "jotai";
import { FaceSmileIcon } from "@heroicons/react/24/outline"; import { InformationCircleIcon } from "@heroicons/react/24/outline";
import SendButton from "../SendButton"; import SendButton from "../SendButton";
import { showingAdvancedPromptAtom } from "@/_helpers/atoms/Modal.atom"; import { showingAdvancedPromptAtom } from "@/_helpers/atoms/Modal.atom";
@ -12,19 +12,17 @@ const BasicPromptAccessories: React.FC = () => {
return ( return (
<div className="absolute inset-x-0 bottom-0 flex justify-between py-2 pl-3 pr-2"> <div className="absolute inset-x-0 bottom-0 flex justify-between py-2 pl-3 pr-2">
{/* Emoji */} {/* Add future accessories here, e.g upload a file */}
<div className="flex items-center space-x-5"> <div className="flex items-center space-x-5">
<div className="flex items-center"> <div className="flex items-center">
<button {/* <button
type="button" type="button"
className="-m-2.5 flex h-10 w-10 items-center justify-center rounded-full text-gray-400 hover:text-gray-500" className="-m-2.5 flex h-10 w-10 items-center justify-center rounded-full text-gray-400 hover:text-gray-500"
> >
<FaceSmileIcon className="h-5 w-5" aria-hidden="true" /> <InformationCircleIcon className="h-5 w-5" aria-hidden="true" />
<span className="sr-only">Attach a file</span> </button> */}
</button>
</div> </div>
</div> </div>
{/* send buton */}
<div className="flex-shrink-0"> <div className="flex-shrink-0">
<SendButton /> <SendButton />
</div> </div>

View File

@ -51,7 +51,8 @@ const BasicPromptInput: React.FC = () => {
}; };
// Auto adjust textarea height based on content // Auto adjust textarea height based on content
const MAX_ROWS = 10; const MAX_ROWS = 30;
const adjustTextareaHeight = () => { const adjustTextareaHeight = () => {
if (textareaRef.current) { if (textareaRef.current) {
textareaRef.current.style.height = "auto"; // 1 row textareaRef.current.style.height = "auto"; // 1 row