diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-10-28 17:12:58 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:15:27 +0100 |
| commit | 60c49f18389ff625177a57277ef8f292a31097bf (patch) | |
| tree | 76b0f1f1792b57659e54d282f93df70088446e3c /src/utils/constants.ts | |
| parent | 05f1dfc6896d3affa7c494a1b955f230d836a4b7 (diff) | |
refactor(providers,hooks): rewrite PrismThemeProvider & usePrismTheme
* reuse Theme provider logic
* move DOM mutation from provider to hook
* add a script to init theme before page load
Diffstat (limited to 'src/utils/constants.ts')
| -rw-r--r-- | src/utils/constants.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 0c64f3a..7129624 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -34,5 +34,10 @@ export const ROUTES = { export const STORAGE_KEY = { ACKEE: 'ackee-tracking', MOTION: 'reduced-motion', + PRISM: 'prismjs-color-scheme', THEME: 'theme', } as const; + +export const PRISM_THEME_ATTRIBUTE = 'data-prismjs-color-scheme-current'; + +export const VALID_THEMES = ['dark', 'light', 'system'] as const; |
