MCPcopy Create free account
hub / github.com/TanStack/devtools / createSolidPlugin

Function createSolidPlugin

packages/devtools-utils/src/solid/plugin.tsx:7–31  ·  view source on GitHub ↗
({
  Component,
  ...config
}: {
  name: string
  id?: string
  defaultOpen?: boolean
  Component: (props: DevtoolsPanelProps) => JSX.Element
})

Source from the content-addressed store, hash-verified

5import type { TanStackDevtoolsPluginProps } from '@tanstack/devtools'
6
7export function createSolidPlugin({
8 Component,
9 ...config
10}: {
11 name: string
12 id?: string
13 defaultOpen?: boolean
14 Component: (props: DevtoolsPanelProps) => JSX.Element
15}) {
16 function Plugin() {
17 return {
18 ...config,
19 render: (_el: HTMLElement, props: TanStackDevtoolsPluginProps) => {
20 return <Component {...props} />
21 },
22 }
23 }
24 function NoOpPlugin() {
25 return {
26 ...config,
27 render: (_el: HTMLElement, _props: TanStackDevtoolsPluginProps) => <></>,
28 }
29 }
30 return [Plugin, NoOpPlugin] as const
31}

Callers 2

plugin.tsFile · 0.90
plugin.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected