Skip to content

Commit 0e46d8d

Browse files
committed
fix: use dialog title component
1 parent 403bde2 commit 0e46d8d

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

lib/DocsChatbot.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ import {
1010
PromptInputSubmit,
1111
type PromptInputMessage,
1212
} from "@/components/ai-elements/prompt-input";
13-
import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
13+
import {
14+
Dialog,
15+
DialogContent,
16+
DialogTitle,
17+
DialogTrigger,
18+
} from "@/components/ui/dialog";
1419
import { ExternalLink, MessageSquare } from "lucide-react";
1520
import { ResponseLight } from "@/components/response-light";
1621
import { DefaultChatTransport } from "ai";
@@ -153,11 +158,7 @@ export const DocsChatbot = ({
153158
"dcb:translate-x-0 dcb:translate-y-0"
154159
)}
155160
>
156-
<div className="dcb:px-4 dcb:py-3 dcb:border-b dcb:bg-background dcb:rounded-lg dcb:flex-shrink-0">
157-
<h2 className="dcb:text-lg dcb:font-sans dcb:font-semibold dcb:text-foreground">
158-
{title}
159-
</h2>
160-
</div>
161+
<DialogTitle>{title}</DialogTitle>
161162

162163
<Conversation className="dcb:relative dcb:w-full dcb:h-full dcb:overflow-hidden">
163164
{error && (

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@sqliteai/docs-chatbot",
33
"description": "Documentation search chatbot powered by SQLite and AI",
4-
"version": "0.1.1",
4+
"version": "0.1.2",
55
"license": "MIT",
66
"type": "module",
77
"repository": {

src/components/ui/dialog.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ function DialogTitle({
122122
<DialogPrimitive.Title
123123
data-slot="dialog-title"
124124
className={cn(
125-
"dcb:text-lg dcb:leading-none dcb:font-semibold",
125+
"dcb:px-4 dcb:py-3 dcb:border-b dcb:bg-background dcb:rounded-lg dcb:flex-shrink-0",
126+
"dcb:text-lg dcb:font-sans dcb:font-semibold dcb:text-foreground",
126127
className
127128
)}
128129
{...props}

0 commit comments

Comments
 (0)