MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / createDevtools

Function createDevtools

packages/frontend/src/controller.tsx:42–65  ·  view source on GitHub ↗
(props: DevtoolsOptions)

Source from the content-addressed store, hash-verified

40export type DevtoolsOptions = Partial<DevtoolsOptionsWithDefaults>
41
42export function createDevtools(props: DevtoolsOptions) {
43
44 const ctx = createAppCtx(props)
45
46 return {
47 output: ctx.output,
48 input: ctx.input,
49 Devtools() {
50 return (
51 <div class={ui.devtools_root_class + ' h-inherit'}>
52 <ui.Styles />
53 <ui.ErrorOverlay
54 footer={ctx.options.errorOverlayFooter()}
55 catchWindowErrors={ctx.options.catchWindowErrors}
56 >
57 <AppCtx.Provider value={ctx}>
58 <App headerSubtitle={ctx.options.headerSubtitle()} />
59 </AppCtx.Provider>
60 </ui.ErrorOverlay>
61 </div>
62 )
63 },
64 }
65}
66
67/**
68 * Views when disposed can cache their state to be restored when opened again.

Callers 1

OverlayFunction · 0.90

Calls 1

createAppCtxFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…