Skip to content

Commit 8f4d144

Browse files
Fix AI assistant demo panel placement (#459)
1 parent 6f3ef17 commit 8f4d144

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/flat-ai-assistant.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@tanstack/create": patch
3+
---
4+
5+
Keep the generated AI assistant demo panel inside the viewport.

packages/create/src/frameworks/react/add-ons/ai/assets/src/components/demo-AIAssistant.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export default function AIAssistant() {
9595
</button>
9696

9797
{isOpen && (
98-
<div className="demo-panel absolute bottom-0 left-full ml-2 flex h-[600px] w-[700px] flex-col overflow-hidden p-0">
98+
<div className="demo-panel fixed inset-x-4 top-20 z-[100] flex h-[calc(100vh-6rem)] max-h-[600px] flex-col overflow-hidden p-0 sm:left-auto sm:w-[min(calc(100vw-2rem),700px)]">
9999
<div className="flex items-center justify-between border-b border-[var(--line)] p-3">
100100
<h3 className="font-semibold text-[var(--sea-ink)]">
101101
AI Assistant

0 commit comments

Comments
 (0)