Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/react/basic/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import ReactDOM from 'react-dom/client'

import { Devtools } from '@tanstack/react-devtools'
function App() {
return (
<div>
<h1>TanStack Devtools Basic Example</h1>
<Devtools />
</div>
)
}
Expand Down
3 changes: 2 additions & 1 deletion examples/solid/basic/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { render } from 'solid-js/web'

import { Devtools } from '@tanstack/solid-devtools'
function App() {
return (
<div>
<h1>TanStack Devtools Basic Example</h1>
<Devtools />
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"size-limit": [
{
"path": "packages/devtools/dist/esm/index.js",
"limit": "6 KB"
"limit": "20 KB"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have some target for this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda unnecessary for this library since it should not get included in prod builds by default. But we can keep it to help catch any accidental import of some dependency. We can feel free to change it whenever.

}
],
"devDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions packages/devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,13 @@
"test:types": "tsc",
"test:build": "publint --strict",
"build": "vite build"
},
"dependencies": {
"clsx": "^2.1.1",
"goober": "^2.1.16",
"solid-js": "^1.9.5"
},
"devDependencies": {
"vite-plugin-solid": "^2.11.6"
}
}
21 changes: 21 additions & 0 deletions packages/devtools/src/components/content-panel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { JSX } from 'solid-js/jsx-runtime'
import { useStyles } from '../styles/use-styles'

export const ContentPanel = (props: {
ref: (el: HTMLDivElement | undefined) => void
children: JSX.Element
handleDragStart?: (e: any) => void
}) => {
const styles = useStyles()
return (
<div ref={props.ref} class={styles().devtoolsPanel}>
{props.handleDragStart ? (
<div
class={styles().dragHandle}
onMouseDown={props.handleDragStart}
></div>
) : null}
{props.children}
</div>
)
}
Loading
Loading