docs: improve dark mode example fiddle (#36596)
This commit is contained in:
parent
644243efd6
commit
327abb4b52
6 changed files with 18 additions and 14 deletions
6
docs/fiddles/features/dark-mode/preload.js
Normal file
6
docs/fiddles/features/dark-mode/preload.js
Normal file
|
@ -0,0 +1,6 @@
|
|||
const { contextBridge, ipcRenderer } = require('electron')
|
||||
|
||||
contextBridge.exposeInMainWorld('darkMode', {
|
||||
toggle: () => ipcRenderer.invoke('dark-mode:toggle'),
|
||||
system: () => ipcRenderer.invoke('dark-mode:system')
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue