Skip to content

Commit

Permalink
Merge pull request #18375 from storybookjs/fix/vue-apply-decorator
Browse files Browse the repository at this point in the history
Vue/Vue3: Fix decorators in StoryStoreV7
  • Loading branch information
shilman authored Jun 1, 2022
2 parents 01fba57 + fc2edfa commit 02ca9da
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/vue/src/client/preview/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { render, renderToDOM } from './render';
export { decorateStory } from './decorateStory';
export { decorateStory as applyDecorators } from './decorateStory';

export const parameters = { framework: 'vue' };
2 changes: 1 addition & 1 deletion app/vue3/src/client/preview/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { render, renderToDOM } from './render';
export { decorateStory } from './decorateStory';
export { decorateStory as applyDecorators } from './decorateStory';

export const parameters = { framework: 'vue3' };
1 change: 1 addition & 0 deletions examples/vue-3-cli/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
disableTelemetry: true,
},
features: {
storyStoreV7: !global.navigator?.userAgent?.match?.('jsdom'),
buildStoriesJson: true,
channelOptions: { allowFunction: false, maxDepth: 10 },
},
Expand Down
1 change: 1 addition & 0 deletions examples/vue-cli/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
disableTelemetry: true,
},
features: {
storyStoreV7: true,
buildStoriesJson: true,
},
};
1 change: 1 addition & 0 deletions examples/vue-kitchen-sink/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ module.exports = {
staticDirs: ['../public'],
features: {
buildStoriesJson: true,
storyStoreV7: !global.navigator?.userAgent?.match?.('jsdom'),
},
};
1 change: 1 addition & 0 deletions examples/vue-kitchen-sink/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export const parameters = {
docs: {
iframeHeight: '60px',
},
globalParameter: 'globalParameter',
};
2 changes: 1 addition & 1 deletion examples/vue-kitchen-sink/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default {
}
</script>

<style>
<style scoped>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ exports[`Storyshots Core/Parameters passed to story 1`] = `
"docs": {
"iframeHeight": "60px"
},
"framework": "vue",
"globalParameter": "globalParameter",
"chapterParameter": "chapterParameter",
"framework": "vue",
"componentParameter": "componentParameter",
"storyParameter": "storyParameter",
"__isArgsStory": true,
"__id": "core-parameters--passed-to-story",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ exports[`Storyshots Custom/Decorator for Vue With Data 1`] = `
"docs": {
"iframeHeight": "60px"
},
"framework": "vue",
"globalParameter": "globalParameter",
"framework": "vue",
"__isArgsStory": true,
"__id": "custom-decorator-for-vue--with-data",
"args": {},
Expand Down
9 changes: 2 additions & 7 deletions examples/vue-kitchen-sink/src/stories/core.stories.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import { addParameters } from '@storybook/vue';

const globalParameter = 'globalParameter';
const chapterParameter = 'chapterParameter';
const componentParameter = 'componentParameter';
const storyParameter = 'storyParameter';

addParameters({ globalParameter });

export default {
title: 'Core/Parameters',
parameters: {
chapterParameter,
componentParameter,
},
};

Expand Down

0 comments on commit 02ca9da

Please sign in to comment.