From bd159fd058c77a01ddbf385d90395b122bc9f551 Mon Sep 17 00:00:00 2001 From: tooppaaa Date: Sat, 9 May 2020 11:28:04 +0200 Subject: [PATCH] cli: sfc_vue stories homogenization --- .../src/stories/1-Button.stories.js | 22 ++++- .../template-csf/src/stories/Welcome.vue | 97 +++++++++---------- .../template-mdx/src/stories/Welcome.vue | 97 +++++++++---------- 3 files changed, 114 insertions(+), 102 deletions(-) diff --git a/lib/cli/src/generators/SFC_VUE/template-csf/src/stories/1-Button.stories.js b/lib/cli/src/generators/SFC_VUE/template-csf/src/stories/1-Button.stories.js index c659ea0fb6a3..25bb8d287e59 100644 --- a/lib/cli/src/generators/SFC_VUE/template-csf/src/stories/1-Button.stories.js +++ b/lib/cli/src/generators/SFC_VUE/template-csf/src/stories/1-Button.stories.js @@ -22,9 +22,23 @@ export const Jsx = () => ({ methods: { action: linkTo('clicked') }, }); -export const Emoji = () => ({ +export const WithSomeEmojiAndAction = () => ({ components: { MyButton }, - template: - '😀 😎 👍 💯', - methods: { action: action('clicked') }, + template: '😀 😎 👍 💯', + methods: { action: action('This was clicked') }, +}); + +WithSomeEmojiAndAction.story = { + name: 'with some emoji and action', + parameters: { notes: 'My notes on a button with emojis' }, +}; + +export const ButtonWithLinkToAnotherStory = () => ({ + components: { MyButton }, + template: 'Go to Welcome Story', + methods: { action: linkTo('Welcome') }, }); + +ButtonWithLinkToAnotherStory.story = { + name: 'button with link to another story', +}; diff --git a/lib/cli/src/generators/SFC_VUE/template-csf/src/stories/Welcome.vue b/lib/cli/src/generators/SFC_VUE/template-csf/src/stories/Welcome.vue index a7bbd1c4fabe..bfb932da3d2a 100644 --- a/lib/cli/src/generators/SFC_VUE/template-csf/src/stories/Welcome.vue +++ b/lib/cli/src/generators/SFC_VUE/template-csf/src/stories/Welcome.vue @@ -1,6 +1,6 @@ diff --git a/lib/cli/src/generators/SFC_VUE/template-mdx/src/stories/Welcome.vue b/lib/cli/src/generators/SFC_VUE/template-mdx/src/stories/Welcome.vue index a7bbd1c4fabe..bfb932da3d2a 100644 --- a/lib/cli/src/generators/SFC_VUE/template-mdx/src/stories/Welcome.vue +++ b/lib/cli/src/generators/SFC_VUE/template-mdx/src/stories/Welcome.vue @@ -1,6 +1,6 @@