@vueless/storybook 1.2.7-beta.0 → 1.2.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22,6 +22,18 @@ export const storyDarkModeDecorator = makeDecorator({
|
|
|
22
22
|
const storybookColorMode = JSON.parse(sbAddonThemesConfig).current || "light";
|
|
23
23
|
const systemColorMode = prefersColorSchemeDark.matches ? "dark" : "light";
|
|
24
24
|
|
|
25
|
+
// this fixing first load
|
|
26
|
+
document.body.classList.add(storybookColorMode);
|
|
27
|
+
|
|
28
|
+
// this fixing white blink issue
|
|
29
|
+
if (window.location.toString().includes("viewMode=docs")) {
|
|
30
|
+
document.documentElement.classList.add(storybookColorMode);
|
|
31
|
+
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
document.documentElement.classList.remove("light", "dark");
|
|
34
|
+
}, 4000);
|
|
35
|
+
}
|
|
36
|
+
|
|
25
37
|
DecoratorHelpers.initializeThemeState(["light", "dark"], storybookColorMode || systemColorMode);
|
|
26
38
|
|
|
27
39
|
previewColorMode = DecoratorHelpers.pluckThemeFromContext(context);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vueless/storybook",
|
|
3
|
-
"version": "1.2.7-beta.
|
|
3
|
+
"version": "1.2.7-beta.1",
|
|
4
4
|
"description": "Simplifies Storybook configuration for Vueless UI library.",
|
|
5
5
|
"author": "Johnny Grid <hello@vueless.com> (https://vueless.com)",
|
|
6
6
|
"homepage": "https://vueless.com",
|