refactor(artifacts-panel): improve header layout and button styles for better UI consistency

This commit is contained in:
Anish Sarkar 2026-07-16 13:58:45 +05:30
parent fc2366c81e
commit bf9d536757

View file

@ -70,20 +70,26 @@ export function ArtifactsPanelContent({ onClose }: { onClose?: () => void }) {
return ( return (
<> <>
<div className="flex h-12 shrink-0 items-center justify-between border-b px-3"> <div className="shrink-0">
<h2 className="select-none text-lg font-semibold">Artifacts</h2> <div className="grid h-12 grid-cols-[minmax(0,1fr)_auto] items-center gap-3 border-b px-4">
<div className="min-w-0 flex flex-1 items-center gap-2">
<p className="truncate text-sm text-muted-foreground">Artifacts</p>
</div>
<div className="flex items-center gap-1 shrink-0">
{onClose && ( {onClose && (
<Button <Button
variant="ghost" variant="ghost"
size="icon" size="icon"
onClick={onClose} onClick={onClose}
className="h-8 w-8 shrink-0 rounded-full text-muted-foreground hover:text-accent-foreground" className="size-6 shrink-0 rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground"
> >
<XIcon className="h-4 w-4" /> <XIcon className="size-4" />
<span className="sr-only">Close artifacts panel</span> <span className="sr-only">Close artifacts panel</span>
</Button> </Button>
)} )}
</div> </div>
</div>
</div>
<ArtifactGroups artifacts={artifacts} /> <ArtifactGroups artifacts={artifacts} />
</> </>
); );