fix(chat): make chat input a little responsive

This commit is contained in:
iMADi-ARCH 2023-06-13 19:08:38 +05:30
parent d60b8c3680
commit cb24730c43
3 changed files with 14 additions and 8 deletions

View File

@ -6,8 +6,8 @@ import Button from "../../../../components/ui/Button";
export function ConfigButton() {
return (
<Link href={"/config"}>
<Button className="px-3" variant={"tertiary"}>
<MdSettings className="text-2xl" />
<Button className="p-2 sm:px-3" variant={"tertiary"}>
<MdSettings className="text-lg sm:text-xl lg:text-2xl" />
</Button>
</Link>
);

View File

@ -8,16 +8,16 @@ export function MicButton() {
return (
<Button
className="px-3"
className="p-2 sm:px-3"
variant={"tertiary"}
type="button"
onClick={startListening}
disabled={!speechSupported}
>
{isListening ? (
<MdMicOff className="text-2xl" />
<MdMicOff className="text-lg sm:text-xl lg:text-2xl" />
) : (
<MdMic className="text-2xl" />
<MdMic className="text-lg sm:text-xl lg:text-2xl" />
)}
</Button>
);

View File

@ -28,11 +28,17 @@ export function ChatInput() {
className="w-full p-2 border border-gray-300 dark:border-gray-500 outline-none rounded dark:bg-gray-800"
placeholder="Begin conversation here..."
/>
<Button type="submit" isLoading={isSendingMessage}>
<Button
className="px-3 py-2 sm:px-4 sm:py-2"
type="submit"
isLoading={isSendingMessage}
>
{isSendingMessage ? "Thinking..." : "Chat"}
</Button>
<MicButton />
<ConfigButton />
<div className="flex items-center">
<MicButton />
<ConfigButton />
</div>
</form>
);
}