@repobuddy/storybook 0.11.1 → 0.11.3
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.
|
@@ -85,12 +85,12 @@ export interface DocsParam {
|
|
|
85
85
|
/**
|
|
86
86
|
* `docs.description.story` can be used to describe the story in doc.
|
|
87
87
|
*/
|
|
88
|
-
story?: string | undefined;
|
|
88
|
+
story?: string | JSX.Element | undefined;
|
|
89
89
|
/**
|
|
90
90
|
* `docs.description.component` can be used to describe the component in meta.
|
|
91
91
|
* It has no effect on the stories.
|
|
92
92
|
*/
|
|
93
|
-
component?: string | undefined;
|
|
93
|
+
component?: string | JSX.Element | undefined;
|
|
94
94
|
} | undefined;
|
|
95
95
|
source?: SourceProps | undefined;
|
|
96
96
|
canvas?: {
|
|
@@ -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
|
@@ -92,12 +92,12 @@ export interface DocsParam {
|
|
|
92
92
|
/**
|
|
93
93
|
* `docs.description.story` can be used to describe the story in doc.
|
|
94
94
|
*/
|
|
95
|
-
story?: string | undefined
|
|
95
|
+
story?: string | JSX.Element | undefined
|
|
96
96
|
/**
|
|
97
97
|
* `docs.description.component` can be used to describe the component in meta.
|
|
98
98
|
* It has no effect on the stories.
|
|
99
99
|
*/
|
|
100
|
-
component?: string | undefined
|
|
100
|
+
component?: string | JSX.Element | undefined
|
|
101
101
|
}
|
|
102
102
|
| undefined
|
|
103
103
|
source?: SourceProps | undefined
|
|
@@ -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
|
}
|