@repobuddy/storybook 0.11.1 → 0.11.2
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.
|
@@ -39,7 +39,7 @@ function addClass(target, className) {
|
|
|
39
39
|
if (!className)
|
|
40
40
|
return;
|
|
41
41
|
if (typeof className === 'string') {
|
|
42
|
-
target.classList.add(className);
|
|
42
|
+
target.classList.add(...className.split(' '));
|
|
43
43
|
}
|
|
44
44
|
else if (Array.isArray(className)) {
|
|
45
45
|
target.classList.add(...className);
|
|
@@ -49,7 +49,7 @@ function removeClass(target, className) {
|
|
|
49
49
|
if (!className)
|
|
50
50
|
return;
|
|
51
51
|
if (typeof className === 'string') {
|
|
52
|
-
target.classList.remove(className);
|
|
52
|
+
target.classList.remove(...className.split(' '));
|
|
53
53
|
}
|
|
54
54
|
else if (Array.isArray(className)) {
|
|
55
55
|
target.classList.remove(...className);
|
package/package.json
CHANGED
|
@@ -58,7 +58,7 @@ export function withDarkMode(
|
|
|
58
58
|
function addClass(target: HTMLElement, className: string | string[] | undefined) {
|
|
59
59
|
if (!className) return
|
|
60
60
|
if (typeof className === 'string') {
|
|
61
|
-
target.classList.add(className)
|
|
61
|
+
target.classList.add(...className.split(' '))
|
|
62
62
|
} else if (Array.isArray(className)) {
|
|
63
63
|
target.classList.add(...className)
|
|
64
64
|
}
|
|
@@ -67,7 +67,7 @@ function addClass(target: HTMLElement, className: string | string[] | undefined)
|
|
|
67
67
|
function removeClass(target: HTMLElement, className: string | string[] | undefined) {
|
|
68
68
|
if (!className) return
|
|
69
69
|
if (typeof className === 'string') {
|
|
70
|
-
target.classList.remove(className)
|
|
70
|
+
target.classList.remove(...className.split(' '))
|
|
71
71
|
} else if (Array.isArray(className)) {
|
|
72
72
|
target.classList.remove(...className)
|
|
73
73
|
}
|