@repobuddy/storybook 0.11.2 → 0.12.0

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?: {
@@ -36,4 +36,4 @@ export type StorybookBuiltInParams = Partial<BackgroundsParam | GlobalApiBackgro
36
36
  * }
37
37
  * ```
38
38
  */
39
- export declare function defineParameters<P extends Record<string, any>>(parameters: P & StorybookBuiltInParams): P & StorybookBuiltInParams;
39
+ export declare function defineParameters<P extends Record<string, any>>(param: P & StorybookBuiltInParams, ...rest: Array<StorybookBuiltInParams>): StorybookBuiltInParams;
@@ -27,6 +27,6 @@
27
27
  * }
28
28
  * ```
29
29
  */
30
- export function defineParameters(parameters) {
31
- return parameters;
30
+ export function defineParameters(param, ...rest) {
31
+ return rest.reduce((acc, param) => Object.assign(acc, param), param);
32
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repobuddy/storybook",
3
- "version": "0.11.2",
3
+ "version": "0.12.0",
4
4
  "description": "Storybook repo buddy",
5
5
  "keywords": [
6
6
  "storybook",
@@ -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
@@ -40,6 +40,9 @@ export type StorybookBuiltInParams = Partial<BackgroundsParam | GlobalApiBackgro
40
40
  * }
41
41
  * ```
42
42
  */
43
- export function defineParameters<P extends Record<string, any>>(parameters: P & StorybookBuiltInParams) {
44
- return parameters
43
+ export function defineParameters<P extends Record<string, any>>(
44
+ param: P & StorybookBuiltInParams,
45
+ ...rest: Array<StorybookBuiltInParams>
46
+ ) {
47
+ return rest.reduce((acc, param) => Object.assign(acc, param), param)
45
48
  }