diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 05dd8d61c90..6fb1f4bebf3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -2,6 +2,12 @@ Issue: ## What I did - - ## How to test + +Is this testable with jest or storyshots? + +Does this need a new example in the kitchen sink apps? + +Does this need an update to the documentation? + +If your answer is yes to any of these, please make sure to include it in your PR. diff --git a/examples/cra-kitchen-sink/src/__snapshots__/storyshots.test.js.snap b/examples/cra-kitchen-sink/src/__snapshots__/storyshots.test.js.snap index c939f783a29..87b857bfac7 100644 --- a/examples/cra-kitchen-sink/src/__snapshots__/storyshots.test.js.snap +++ b/examples/cra-kitchen-sink/src/__snapshots__/storyshots.test.js.snap @@ -468,6 +468,376 @@ exports[`Storyshots AddonInfo.DocgenButton DocgenButton 1`] = ` `; +exports[`Storyshots AddonInfo.FlowTypeButton FlowTypeButton 1`] = ` +
+
+ +
+ + Show Info + +
+ + × + +
+
+
+

+ AddonInfo.FlowTypeButton +

+

+ FlowTypeButton +

+
+
+

+ Some Description +

+
+
+

+ Story Source +

+
+            
+ + < + FlowTypeButton + + + + + + onClick + + + = + + + + clicked() + + + + + + + + + label + + + = + + + " + Flow Typed Button + " + + + + + + + + /> + +
+
+
+
+

+ Prop Types +

+
+

+ " + FlowTypeButton + " Component +

+ + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + + + + false + + + +
+ onClick + + + + + + onClick() + + + +
+
+
+
+
+
+
+`; + exports[`Storyshots App full app 1`] = `
+ ; + +FlowTypeButton.defaultProps = { + disabled: false, + onClick: () => {}, +}; + +export default FlowTypeButton; diff --git a/examples/cra-kitchen-sink/src/stories/index.js b/examples/cra-kitchen-sink/src/stories/index.js index 38db317317c..ada77d629f7 100644 --- a/examples/cra-kitchen-sink/src/stories/index.js +++ b/examples/cra-kitchen-sink/src/stories/index.js @@ -27,6 +27,7 @@ import App from '../App'; import Logger from './Logger'; import Container from './Container'; import DocgenButton from '../components/DocgenButton'; +import FlowTypeButton from '../components/FlowTypeButton'; const EVENTS = { TEST_EVENT_1: 'test-event-1', @@ -167,6 +168,13 @@ storiesOf('AddonInfo.DocgenButton', module).addWithInfo('DocgenButton', 'Some De ); +storiesOf( + 'AddonInfo.FlowTypeButton', + module +).addWithInfo('FlowTypeButton', 'Some Description', () => + +); + storiesOf('App', module).add('full app', () => ); storiesOf('Some really long story kind description', module) diff --git a/lib/cli/generators/VUE/template/stories/MyButton.js b/lib/cli/generators/VUE/template/stories/MyButton.js index aea1ebbf27f..785d4c29e53 100644 --- a/lib/cli/generators/VUE/template/stories/MyButton.js +++ b/lib/cli/generators/VUE/template/stories/MyButton.js @@ -23,6 +23,7 @@ export default { methods: { onClick () { + this.$emit('click') } } }