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

Function SettingsTab

packages/devtools/src/tabs/settings-tab.tsx:24–200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22
23export const SettingsTab = () => {
24 const { setSettings, settings } = createDevtoolsSettings()
25 const styles = createStyles()
26 const modifiers: Array<KeyboardKey> = ['CtrlOrMeta', 'Alt', 'Shift']
27
28 return (
29 <div
30 data-testid="settings-workspace"
31 data-tsd-surface
32 style={{ height: '100%', 'min-height': '0px' }}
33 >
34 <MainPanel withPadding>
35 <Section>
36 <SectionTitle>
37 <SectionIcon>
38 <SettingsCog />
39 </SectionIcon>
40 General
41 </SectionTitle>
42 <SectionDescription>
43 Configure general behavior of the devtools panel.
44 </SectionDescription>
45 <div class={styles().settingsGroup}>
46 <Checkbox
47 label="Default open"
48 description="Automatically open the devtools panel when the page loads"
49 onChange={() =>
50 setSettings({ defaultOpen: !settings().defaultOpen })
51 }
52 checked={settings().defaultOpen}
53 />
54 <Checkbox
55 label="Hide trigger until hovered"
56 description="Keep the devtools trigger button hidden until you hover over its area"
57 onChange={() =>
58 setSettings({ hideUntilHover: !settings().hideUntilHover })
59 }
60 checked={settings().hideUntilHover}
61 />
62 <Checkbox
63 label="Completely hide trigger"
64 description="Completely removes the trigger from the DOM (you can still open it with the hotkey)"
65 onChange={() =>
66 setSettings({ triggerHidden: !settings().triggerHidden })
67 }
68 checked={settings().triggerHidden}
69 />
70 <Select
71 label="Theme"
72 options={[
73 { label: 'Dark', value: 'dark' },
74 { label: 'Light', value: 'light' },
75 ]}
76 value={settings().theme}
77 onChange={(theme) => setSettings({ theme })}
78 />
79 </div>
80 </Section>
81

Callers

nothing calls this directly

Calls 3

createDevtoolsSettingsFunction · 0.90
createStylesFunction · 0.90
setSettingsFunction · 0.85

Tested by

no test coverage detected