aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/providers/prism.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-02-08 15:03:53 +0100
committerArmand Philippot <git@armandphilippot.com>2022-02-08 15:06:11 +0100
commit5d79523eba4ec0a89668b904dc7896c843ab8dd6 (patch)
treeef456b0545fb566e7bbc9981c950ec013d8c7696 /src/utils/providers/prism.tsx
parent8f0fadc3a1a331956bef3aa299a1c468927bcdf0 (diff)
refactor(prism): rename color scheme attributes and remove prefix
Diffstat (limited to 'src/utils/providers/prism.tsx')
-rw-r--r--src/utils/providers/prism.tsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/utils/providers/prism.tsx b/src/utils/providers/prism.tsx
index 840f9d8..7a4221d 100644
--- a/src/utils/providers/prism.tsx
+++ b/src/utils/providers/prism.tsx
@@ -57,7 +57,7 @@ const getTheme = (key: string): PrismTheme | undefined => {
};
export const PrismThemeProvider: FC<PrismThemeProviderProps> = ({
- attribute = 'data-prismjs-color-scheme',
+ attribute = 'data-prismjs-color-scheme-current',
storageKey = 'prismjs-color-scheme',
themes = ['dark', 'light', 'system'],
children,
@@ -125,7 +125,6 @@ export const PrismThemeProvider: FC<PrismThemeProviderProps> = ({
mutations.forEach((record) => {
var mutatedPre = record.target as HTMLPreElement;
var newTheme = mutatedPre.getAttribute(attribute) as PrismTheme;
- console.log('here');
setPrismTheme(newTheme);
});
});