docs: update macos-dark-mode fiddle and guide content (#29198)
* update macos dark mode docs for Electron v12 * pr review fixes * more pr review fixes * reorg paragraphs for better flow * Update docs/tutorial/dark-mode.md Co-authored-by: Erick Zhao <erick@hotmail.ca> * pr fixes Co-authored-by: Erick Zhao <erick@hotmail.ca>
This commit is contained in:
parent
adb85f341b
commit
5656493676
4 changed files with 93 additions and 83 deletions
6
docs/fiddles/features/macos-dark-mode/preload.js
Normal file
6
docs/fiddles/features/macos-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