Skip to content
This repository was archived by the owner on Feb 3, 2024. It is now read-only.

Commit 034d41b

Browse files
committed
docs: add pure usage to website
1 parent adcd560 commit 034d41b

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

packages/docs/usage.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,18 @@ mode.update((mode) => (mode === 'light' ? 'dark' : 'light'))
114114
be updated by the user in their system settings.
115115
- We do listen for changes to the OS color mode.
116116
- `subscribe(listener: (mode: ColorMode) => void): () => void`
117+
118+
## Pure Usage
119+
120+
If for some reason you don't want PDM to automatically initialize itself and add itself on `window.__pdm__` you can use the pure version:
121+
122+
```js
123+
import { createPerfectDarkMode } from 'perfect-dark-mode'
124+
125+
const pdm = createPerfectDarkMode()
126+
```
127+
128+
This version comes in a couple module formats:
129+
130+
- `dist/pure.esm.js`
131+
- `dist/pure.cjs.js`

0 commit comments

Comments
 (0)