Skip to content

Commit c25f92d

Browse files
committed
Created the inital setup and the devtools skeleton
1 parent ba99220 commit c25f92d

File tree

28 files changed

+1990
-12
lines changed

28 files changed

+1990
-12
lines changed

examples/react/basic/src/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import ReactDOM from 'react-dom/client'
2-
2+
import { Devtools } from "@tanstack/react-devtools"
33
function App() {
44
return (
55
<div>
66
<h1>TanStack Devtools Basic Example</h1>
7+
<Devtools />
78
</div>
89
)
910
}

examples/solid/basic/src/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { render } from 'solid-js/web'
2-
2+
import { Devtools } from '@tanstack/solid-devtools'
33
function App() {
44
return (
55
<div>
66
<h1>TanStack Devtools Basic Example</h1>
7+
<Devtools />
78
</div>
89
)
910
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"size-limit": [
4848
{
4949
"path": "packages/devtools/dist/esm/index.js",
50-
"limit": "6 KB"
50+
"limit": "20 KB"
5151
}
5252
],
5353
"devDependencies": {
@@ -78,4 +78,4 @@
7878
"@tanstack/react-devtools": "workspace:*",
7979
"@tanstack/solid-devtools": "workspace:*"
8080
}
81-
}
81+
}

packages/devtools/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,13 @@
5656
"test:types": "tsc",
5757
"test:build": "publint --strict",
5858
"build": "vite build"
59+
},
60+
"dependencies": {
61+
"clsx": "^2.1.1",
62+
"goober": "^2.1.16",
63+
"solid-js": "^1.9.5"
64+
},
65+
"devDependencies": {
66+
"vite-plugin-solid": "^2.11.6"
5967
}
6068
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { JSX } from "solid-js/jsx-runtime"
2+
import { useStyles } from "../styles/use-styles"
3+
4+
export const ContentPanel = (props: {
5+
ref: (el: HTMLDivElement | undefined) => void,
6+
children: JSX.Element,
7+
handleDragStart?: (e: any,) => void
8+
9+
}) => {
10+
const styles = useStyles()
11+
return (
12+
<div ref={props.ref} class={styles().devtoolsPanel}>
13+
{props.handleDragStart ? (
14+
<div class={styles().dragHandle} onMouseDown={props.handleDragStart}></div>
15+
) : null}
16+
{props.children}
17+
</div>
18+
)
19+
}

0 commit comments

Comments
 (0)