MCPcopy
hub / github.com/system-ui/theme-ui / DarkModeButton

Function DarkModeButton

packages/theme-provider/test/index.tsx:162–168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

160
161test('updates CSS Custom Properties on root element', async () => {
162 const DarkModeButton = () => {
163 const { colorMode, setColorMode } = useThemeUI()
164
165 if (colorMode === 'dark') return null
166
167 return <button onClick={() => setColorMode!('dark')}>Dark Mode</button>
168 }
169
170 const root = render(
171 <ThemeUIProvider

Callers

nothing calls this directly

Calls 1

useThemeUIFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…