Skip to content

Commit cb68faf

Browse files
committed
Fix AI assistant demo panel placement
1 parent efb411e commit cb68faf

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
@@ -97,7 +97,7 @@ export default function AIAssistant() {
9797
</button>
9898

9999
{isOpen && (
100-
<div className="absolute bottom-0 left-full ml-2 w-[700px] h-[600px] bg-gray-900 rounded-lg shadow-xl border border-orange-500/20 flex flex-col">
100+
<div className="fixed inset-x-4 top-20 z-[100] flex h-[calc(100vh-6rem)] max-h-[600px] flex-col overflow-hidden rounded-lg border border-orange-500/20 bg-gray-900 shadow-xl sm:left-auto sm:w-[min(calc(100vw-2rem),700px)]">
101101
<div className="flex items-center justify-between p-3 border-b border-orange-500/20">
102102
<h3 className="font-semibold text-white">AI Assistant</h3>
103103
<button

0 commit comments

Comments
 (0)