storybook-addon-sdc 0.1.16 → 0.1.18
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.
- package/README.md +1 -1
- package/dist/preset.js +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -195,7 +195,7 @@ The [community will have to decide](https://docs.google.com/document/d/1wCQLXrK1
|
|
|
195
195
|
|
|
196
196
|
|
|
197
197
|
## Regular storybook
|
|
198
|
-
All storybook functions
|
|
198
|
+
All storybook functions work as usual and you can import SDC YAML into `.stories.js`
|
|
199
199
|
|
|
200
200
|
[example](https://github.com/iberdinsky-skilld/sdc-addon/blob/main/stories/page-example.stories.js)
|
|
201
201
|
|
package/dist/preset.js
CHANGED
|
@@ -5540,6 +5540,7 @@ var storiesGenerator_default = (stories) => {
|
|
|
5540
5540
|
return Object.entries(stories).map(([storyKey, { props = {}, slots = {} }]) => `
|
|
5541
5541
|
export const ${storyKey} = {
|
|
5542
5542
|
args: {
|
|
5543
|
+
...Basic.args,
|
|
5543
5544
|
${generateArgs2(props)}
|
|
5544
5545
|
${generateArgs2(slots, true)}
|
|
5545
5546
|
},
|
|
@@ -5665,6 +5666,10 @@ var vite_plugin_storybook_yaml_stories_default = ({ jsonSchemaFakerOptions = {}
|
|
|
5665
5666
|
componentMetadata: metadata,
|
|
5666
5667
|
...argsGenerator_default(content, jsonSchemaFakerOptions)
|
|
5667
5668
|
};
|
|
5669
|
+
const basicArgs = {
|
|
5670
|
+
componentMetadata: metadata,
|
|
5671
|
+
...argsGenerator_default(content, jsonSchemaFakerOptions)
|
|
5672
|
+
};
|
|
5668
5673
|
const stories = content.thirdPartySettings?.sdcStorybook?.stories ? storiesGenerator_default(content.thirdPartySettings.sdcStorybook.stories) : "";
|
|
5669
5674
|
return `
|
|
5670
5675
|
${imports}
|
|
@@ -5677,6 +5682,7 @@ export default {
|
|
|
5677
5682
|
};
|
|
5678
5683
|
|
|
5679
5684
|
export const Basic = {
|
|
5685
|
+
args: ${JSON.stringify(basicArgs, null, 2)},
|
|
5680
5686
|
play: async ({ canvasElement }) => {
|
|
5681
5687
|
Drupal.attachBehaviors(canvasElement, window.drupalSettings);
|
|
5682
5688
|
},
|
|
@@ -5779,5 +5785,6 @@ var previewHead = (head) => `
|
|
|
5779
5785
|
export {
|
|
5780
5786
|
experimental_indexers,
|
|
5781
5787
|
previewHead,
|
|
5788
|
+
resolveComponentPath2 as resolveComponentPath,
|
|
5782
5789
|
viteFinal
|
|
5783
5790
|
};
|