An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
feat: Enhance ArtifactPanel layout with improved padding and add separator
Yoshiki Miuraea1c79279cf6
diff --git a/components/artifact/artifact-panel.tsx b/components/artifact/artifact-panel.tsxindex 9787daed..2148bdac 100644--- a/components/artifact/artifact-panel.tsx+++ b/components/artifact/artifact-panel.tsx@@ -1,6 +1,7 @@'use client'import { Button } from '@/components/ui/button'+import { Separator } from '@/components/ui/separator'import { Minimize2, Wrench } from 'lucide-react'import { ArtifactContent } from './artifact-content'import { useArtifact } from './artifact-context'@@ -11,9 +12,9 @@ export function ArtifactPanel() {if (!artifact) return nullreturn (- <div className="h-full flex flex-col overflow-hidden bg-muted">- <div className="flex flex-col h-full m-4 mt-16 bg-background rounded-xl">- <div className="flex items-center justify-between p-4">+ <div className="h-full flex flex-col overflow-hidden bg-muted md:px-4 md:py-4 md:pb-4 md:pt-14">+ <div className="flex flex-col h-full bg-background rounded-xl">+ <div className="flex items-center justify-between px-4 py-2"><h3 className="flex items-center gap-2"><div className="bg-muted p-2 rounded-md flex items-center gap-2"><Wrench size={18} />@@ -31,6 +32,7 @@ export function ArtifactPanel() {<Minimize2 className="h-4 w-4" /></Button></div>+ <Separator className="my-1 bg-border/50" /><div className="flex-1 overflow-y-auto p-4"><ArtifactContent artifact={artifact} /></div>diff --git a/components/artifact/chat-artifact-container.tsx b/components/artifact/chat-artifact-container.tsxindex 0fdd9d41..2d363cfc 100644--- a/components/artifact/chat-artifact-container.tsx+++ b/components/artifact/chat-artifact-container.tsx@@ -42,7 +42,7 @@ export function ChatArtifactContainer({}, [state.isOpen, renderPanel])return (- <div className="flex-1 min-h-0 flex">+ <div className="flex-1 min-h-0 h-screen flex">{/* Desktop: Resizable panels (Do not render on mobile) */}{!isMobile && (<ResizablePanelGroup