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

Function SidePanel

packages/frontend/src/SidePanel.tsx:52–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 })
51
52 function SidePanel() {
53 return (
54 <SidePanelCtx.Provider value={{openPanel, setOpenPanel}}>
55 <div
56 class="h-full grid"
57 style={{
58 'grid-template-rows': `${theme.spacing.header_height} 1fr`,
59 'grid-template-columns': '100%',
60 }}
61 >
62 <header class="relative p-l-4 flex items-center">
63 <div class={panel_header_el_border} />
64 <div class="flex items-center gap-x-2">
65 <OwnerName name={state.name} type={state.type} is_title />
66 {state.hmr && <>
67 <ui.Badge>HMR</ui.Badge>
68 </>}
69 </div>
70 <div class="p-x-1 ml-auto flex items-center gap-x-1">
71 {/* <button class={styles.actions.button}>
72 <Icon.Eye class={styles.actions.icon} />
73 </button> */}
74 {state.location && (
75 <button
76 title="Open component location"
77 class={action_button}
78 onClick={openComponentLocation}
79 >
80 <ui.icon.Code class={action_icon} />
81 </button>
82 )}
83 <button
84 title="Close inspector"
85 class={action_button}
86 onClick={() => setInspectedOwner(null)}
87 >
88 <ui.icon.Close class={action_icon} />
89 </button>
90 </div>
91 <ui.ToggleTabs
92 class="b-l b-solid b-panel-2 h-full"
93 active={openPanel()}
94 onSelect={setOpenPanel}
95 >
96 {Option =>
97 (['inspector', 'dgraph'] as const).map(panel => (
98 <Option for={panel}>{tabsTitleMap[panel]}</Option>
99 ))
100 }
101 </ui.ToggleTabs>
102 </header>
103 <s.Switch>
104 <s.Match when={openPanel() === 'inspector'}>
105 <InspectorView />
106 </s.Match>
107 <s.Match when={openPanel() === 'dgraph'}>
108 <dgraph.Dgraph_View />
109 </s.Match>

Callers

nothing calls this directly

Calls 1

setInspectedOwnerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…