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

Function createHeight

packages/devtools/src/context/use-devtools-context.ts:121–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119 const { state, setState } = createDevtoolsState()
120 const isCollapsed = createMemo(() => state().subheaderCollapsed)
121 const setCollapsed = (value: boolean | ((previous: boolean) => boolean)) => {
122 const next =
123 typeof value === 'function' ? value(state().subheaderCollapsed) : value
124 setState({ subheaderCollapsed: next })
125 }
126 return {
127 isCollapsed,
128 toggleCollapsed: () => setCollapsed((previous) => !previous),
129 setCollapsed,
130 }
131}
132
133/**
134 * Handing a drag from the Plugins strip over to the workspace.

Callers 2

DevToolsFunction · 0.90
MainPanelFunction · 0.90

Calls 1

createDevtoolsStateFunction · 0.85

Tested by

no test coverage detected