docs: improve dark mode example fiddle (#36596)

This commit is contained in:
David Sanders 2023-01-02 02:02:15 -08:00 committed by GitHub
parent 644243efd6
commit 327abb4b52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 14 deletions

View 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')
})