Skip to content

Commit 7316f82

Browse files
committed
Fix the DialogContent/DialogTitle error displayed in the console.
1 parent d69b910 commit 7316f82

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

webview-ui/src/components/settings/ApiConfigManager.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { memo, useEffect, useRef, useState } from "react"
33
import { ApiConfigMeta } from "../../../../src/shared/ExtensionMessage"
44
import { Dropdown } from "vscrui"
55
import type { DropdownOption } from "vscrui"
6-
import { Dialog, DialogContent } from "../ui/dialog"
6+
import { Dialog, DialogContent, DialogTitle } from "../ui/dialog"
77

88
interface ApiConfigManagerProps {
99
currentApiConfigName?: string
@@ -298,9 +298,7 @@ const ApiConfigManager = ({
298298
}}
299299
aria-labelledby="new-profile-title">
300300
<DialogContent className="p-4 max-w-sm">
301-
<h2 id="new-profile-title" className="text-lg font-semibold mb-4">
302-
New Configuration Profile
303-
</h2>
301+
<DialogTitle>New Configuration Profile</DialogTitle>
304302
<button className="absolute right-4 top-4" aria-label="Close dialog" onClick={resetCreateState}>
305303
<span className="codicon codicon-close" />
306304
</button>

webview-ui/src/components/settings/__tests__/ApiConfigManager.test.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jest.mock("@/components/ui/dialog", () => ({
4141
</div>
4242
),
4343
DialogContent: ({ children }: any) => <div data-testid="dialog-content">{children}</div>,
44+
DialogTitle: ({ children }: any) => <div data-testid="dialog-title">{children}</div>,
4445
}))
4546

4647
describe("ApiConfigManager", () => {

0 commit comments

Comments
 (0)