Skip to content

Commit 458a9be

Browse files
feat(devtools): extract theme to devtool components (#2079)
1 parent 3f52569 commit 458a9be

File tree

6 files changed

+170
-125
lines changed

6 files changed

+170
-125
lines changed

.changeset/wicked-feet-camp.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@tanstack/react-form-devtools': patch
3+
'@tanstack/solid-form-devtools': patch
4+
'@tanstack/form-devtools': patch
5+
---
6+
7+
Extract devtools theme to form devtools

packages/form-devtools/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
"src"
7373
],
7474
"dependencies": {
75-
"@tanstack/devtools-ui": "^0.5.0",
76-
"@tanstack/devtools-utils": "^0.3.2",
75+
"@tanstack/devtools-ui": "^0.5.1",
76+
"@tanstack/devtools-utils": "^0.4.0",
7777
"@tanstack/form-core": "workspace:*",
7878
"clsx": "^2.1.1",
7979
"dayjs": "^1.11.18",
Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
1+
import { ThemeContextProvider } from '@tanstack/devtools-ui'
2+
13
import { FormEventClientProvider } from '../contexts/eventClientContext'
24
import { Shell } from './Shell'
35

4-
export default function Devtools() {
6+
import type { TanStackDevtoolsTheme } from '@tanstack/devtools-ui'
7+
8+
interface DevtoolsProps {
9+
theme: TanStackDevtoolsTheme
10+
}
11+
12+
export default function Devtools(props: DevtoolsProps) {
513
return (
6-
<FormEventClientProvider>
7-
<Shell />
8-
</FormEventClientProvider>
14+
<ThemeContextProvider theme={props.theme}>
15+
<FormEventClientProvider>
16+
<Shell />
17+
</FormEventClientProvider>
18+
</ThemeContextProvider>
919
)
1020
}

packages/react-form-devtools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"src"
5353
],
5454
"dependencies": {
55-
"@tanstack/devtools-utils": "^0.3.2",
55+
"@tanstack/devtools-utils": "^0.4.0",
5656
"@tanstack/form-devtools": "workspace:*"
5757
},
5858
"devDependencies": {

packages/solid-form-devtools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"solid-js": ">=1.9.7"
5555
},
5656
"dependencies": {
57-
"@tanstack/devtools-utils": "^0.3.2",
57+
"@tanstack/devtools-utils": "^0.4.0",
5858
"@tanstack/form-devtools": "workspace:*"
5959
},
6060
"devDependencies": {

0 commit comments

Comments
 (0)