From f7a10d381398274a6e3d11ef3d139282f78304fc Mon Sep 17 00:00:00 2001 From: Jeremy Date: Tue, 17 Dec 2024 15:36:51 +0530 Subject: [PATCH] feat: tweak color and input styles (#627) --- app/globals.css | 10 ++++---- components/icons.tsx | 19 ++++++++++++++ components/model-selector.tsx | 2 +- components/multimodal-input.tsx | 40 ++++++++++++++++-------------- components/visibility-selector.tsx | 2 +- 5 files changed, 48 insertions(+), 25 deletions(-) diff --git a/app/globals.css b/app/globals.css index 93cd124..9de647f 100644 --- a/app/globals.css +++ b/app/globals.css @@ -30,9 +30,9 @@ --card-foreground: 240 10% 3.9%; --popover: 0 0% 100%; --popover-foreground: 240 10% 3.9%; - --primary: 217 100% 45%; + --primary: 240 5.9% 10%; --primary-foreground: 0 0% 98%; - --secondary: 213 100% 96%; + --secondary: 240 4.8% 95.9%; --secondary-foreground: 240 5.9% 10%; --muted: 240 4.8% 95.9%; --muted-foreground: 240 3.8% 46.1%; @@ -40,7 +40,7 @@ --accent-foreground: 240 5.9% 10%; --destructive: 0 84.2% 60.2%; --destructive-foreground: 0 0% 98%; - --border: 214 32% 91%; + --border: 240 5.9% 90%; --input: 240 5.9% 90%; --ring: 240 10% 3.9%; --chart-1: 12 76% 61%; @@ -65,8 +65,8 @@ --card-foreground: 0 0% 98%; --popover: 240 10% 3.9%; --popover-foreground: 0 0% 98%; - --primary: 208.69 100% 24.18%; - --primary-foreground: 207 100% 96%; + --primary: 0 0% 98%; + --primary-foreground: 240 5.9% 10%; --secondary: 240 3.7% 15.9%; --secondary-foreground: 0 0% 98%; --muted: 240 3.7% 15.9%; diff --git a/components/icons.tsx b/components/icons.tsx index 248a527..480f696 100644 --- a/components/icons.tsx +++ b/components/icons.tsx @@ -1083,3 +1083,22 @@ export const LogsIcon = ({ size = 16 }: { size?: number }) => { ); }; + +export const ImageIcon = ({ size = 16 }: { size?: number }) => { + return ( + + + + ); +}; diff --git a/components/model-selector.tsx b/components/model-selector.tsx index 16ef9fd..dbf52cb 100644 --- a/components/model-selector.tsx +++ b/components/model-selector.tsx @@ -67,7 +67,7 @@ export function ModelSelector({ )} -
+
diff --git a/components/multimodal-input.tsx b/components/multimodal-input.tsx index b6dd7e4..8b9faf6 100644 --- a/components/multimodal-input.tsx +++ b/components/multimodal-input.tsx @@ -23,7 +23,7 @@ import { useLocalStorage, useWindowSize } from 'usehooks-ts'; import { sanitizeUIMessages } from '@/lib/utils'; -import { ArrowUpIcon, PaperclipIcon, StopIcon } from './icons'; +import { ArrowUpIcon, ImageIcon, PaperclipIcon, StopIcon } from './icons'; import { PreviewAttachment } from './preview-attachment'; import { Button } from './ui/button'; import { Textarea } from './ui/textarea'; @@ -228,10 +228,10 @@ function PureMultimodalInput({ value={input} onChange={handleInput} className={cx( - 'min-h-[24px] max-h-[calc(75dvh)] overflow-hidden resize-none rounded-xl !text-base bg-muted', + 'min-h-[24px] max-h-[calc(75dvh)] overflow-hidden resize-none rounded-2xl !text-base bg-muted pb-10 dark:border-zinc-700', className, )} - rows={3} + rows={2} autoFocus onKeyDown={(event) => { if (event.key === 'Enter' && !event.shiftKey) { @@ -246,17 +246,21 @@ function PureMultimodalInput({ }} /> - {isLoading ? ( - - ) : ( - - )} +
+ +
- +
+ {isLoading ? ( + + ) : ( + + )} +
); } @@ -281,15 +285,15 @@ function PureAttachmentsButton({ }) { return ( ); } @@ -305,7 +309,7 @@ function PureStopButton({ }) { return (