diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-a11y.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-a11y.stories.storyshot index 878bc98efa77..37f01abf82a0 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-a11y.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-a11y.stories.storyshot @@ -27,3 +27,31 @@ exports[`Storyshots Addon a11y Label 1`] = ` Testing the a11y addon `; + +exports[`Storyshots Addons|a11y Default 1`] = ` + +`; + +exports[`Storyshots Addons|a11y Disabled 1`] = ` + +`; + +exports[`Storyshots Addons|a11y Invalid contrast 1`] = ` + +`; + +exports[`Storyshots Addons|a11y Label 1`] = ` + +`; diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot index c9e4412cb647..cddeca338c91 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot @@ -39,3 +39,43 @@ exports[`Storyshots Addon Actions Reserved keyword as name 1`] = ` Delete `; + +exports[`Storyshots Addons|Actions Circular Payload 1`] = ` + +`; + +exports[`Storyshots Addons|Actions Decorated Action 1`] = ` + +`; + +exports[`Storyshots Addons|Actions Function Name 1`] = ` + +`; + +exports[`Storyshots Addons|Actions Hello World 1`] = ` + +`; + +exports[`Storyshots Addons|Actions Reserved keyword as name 1`] = ` + +`; diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-backgrounds.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-backgrounds.stories.storyshot index 47cb40abe1be..a486a9d6af7d 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-backgrounds.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-backgrounds.stories.storyshot @@ -19,3 +19,23 @@ exports[`Storyshots Addon Backgrounds story 2 1`] = ` `; + +exports[`Storyshots Addons|Backgrounds story 1 1`] = ` +
+ +
+`; + +exports[`Storyshots Addons|Backgrounds story 2 1`] = ` +
+ +
+`; diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-info.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-info.stories.storyshot index c161f17376d2..840a27fe8c72 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-info.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-info.stories.storyshot @@ -3879,3 +3879,3593 @@ exports[`Storyshots Addon Info.React Docgen Comments from component declaration `; + +exports[`Storyshots Addons|Info.GitHub issues #1814 1`] = ` +
+
+
+ + + + +
+
+ +
+ +
+
+
+

+ Addons|Info.GitHub issues +

+

+ #1814 +

+
+
+
+ Allow Duplicate DisplayNames for HOC #1814 +
+
+
+

+ Story Source +

+
+            
+
+ + <div + + + + + + > + +
+
+ + <Unknown + + + + + + /> + +
+
+ + <Unknown + + + + + + /> + +
+
+ + </div> + +
+
+
+
+
+

+ Prop Types +

+
+

+ "" Component +

+ + No propTypes defined! + +
+
+

+ "" Component +

+ + No propTypes defined! + +
+
+
+
+
+
+`; + +exports[`Storyshots Addons|Info.Markdown Displays Markdown in description 1`] = ` +
+
+ +
+ +
+ +
+
+
+

+ Addons|Info.Markdown +

+

+ Displays Markdown in description +

+
+
+

+ You can use markdown in your withInfo() description. +

+
+ Sometimes you might want to manually include some code examples: +
+
+            
+              const codeblock = [];
+            
+          
+
+ Maybe include a + + link + + to your project as well. +
+
+
+

+ Story Source +

+
+            
+ + <BaseButton + + + + + + onClick + + + = + + + { + + clicked() + + } + + + + + + + + label + + + = + + + "Button" + + + + + + + + /> + +
+
+
+
+

+ Prop Types +

+
+

+ "BaseButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + + + + - + + + { + + false + + } + + + +
+ label + + + + + + yes + + - + + +
+ onClick + + + + + + - + + + { + + onClick() + + } + + + +
+ style + + + + + + - + + + { + + {} + + } + + + +
+
+
+
+
+
+
+`; + +exports[`Storyshots Addons|Info.Options.TableComponent Use a custom component for the table 1`] = ` +
+
+ +
+ +
+ +
+
+
+

+ Addons|Info.Options.TableComponent +

+

+ Use a custom component for the table +

+
+
+

+ Story Source +

+
+            
+ + <BaseButton + + + + + + label + + + = + + + "Button" + + + + + + + + /> + +
+
+
+
+

+ Prop Types +

+
+

+ "BaseButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + default + + description +
+ disabled + + + + false + + +
+ label + + * + + + + + + + +
+ onClick + + + + + + +
+ style + + + + {} + + +
+
+
+
+
+
+
+`; + +exports[`Storyshots Addons|Info.Options.header Shows or hides Info Addon header 1`] = ` +
+
+ +
+ +
+ +
+
+
+
+ The Info Addon header should be hidden +
+
+
+

+ Story Source +

+
+            
+ + <BaseButton + + + + + + label + + + = + + + "Button" + + + + + + + + /> + +
+
+
+
+

+ Prop Types +

+
+

+ "BaseButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + + + + - + + + { + + false + + } + + + +
+ label + + + + + + yes + + - + + +
+ onClick + + + + + + - + + + { + + onClick() + + } + + + +
+ style + + + + + + - + + + { + + {} + + } + + + +
+
+
+
+
+
+
+`; + +exports[`Storyshots Addons|Info.Options.inline Inlines component inside story 1`] = ` +
+
+
+
+

+ Addons|Info.Options.inline +

+

+ Inlines component inside story +

+
+
+
+
+ +
+
+
+
+
+ Component should be inlined between description and PropType table +
+
+
+

+ Story Source +

+
+          
+ + <BaseButton + + + + + + label + + + = + + + "Button" + + + + + + + + /> + +
+
+
+
+

+ Prop Types +

+
+

+ "BaseButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + + + + - + + + { + + false + + } + + + +
+ label + + + + + + yes + + - + + +
+ onClick + + + + + + - + + + { + + onClick() + + } + + + +
+ style + + + + + + - + + + { + + {} + + } + + + +
+
+
+
+
+
+`; + +exports[`Storyshots Addons|Info.Options.propTables Shows additional component prop tables 1`] = ` +
+
+ +
+ +
+ +
+
+
+

+ Addons|Info.Options.propTables +

+

+ Shows additional component prop tables +

+
+
+
+ There should be a prop table added for a component not included in the story +
+
+
+

+ Story Source +

+
+            
+ + <BaseButton + + + + + + label + + + = + + + "Button" + + + + + + + + /> + +
+
+
+
+

+ Prop Types +

+
+

+ "BaseButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + + + + - + + + { + + false + + } + + + +
+ label + + + + + + yes + + - + + +
+ onClick + + + + + + - + + + { + + onClick() + + } + + + +
+ style + + + + + + - + + + { + + {} + + } + + + +
+
+
+

+ "FlowTypeButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + unknown + + + - + + + { + + false + + } + + + +
+ onClick + + + unknown + + + - + + + { + + onClick() + + } + + + +
+
+
+
+
+
+
+`; + +exports[`Storyshots Addons|Info.Options.propTablesExclude Exclude component from prop tables 1`] = ` +
+
+
+ + +
+
+ +
+ +
+
+
+

+ Addons|Info.Options.propTablesExclude +

+

+ Exclude component from prop tables +

+
+
+
+ This can exclude extraneous components from being displayed in prop tables. +
+
+
+

+ Story Source +

+
+            
+
+ + <div + + + + + + > + +
+
+ + <BaseButton + + + + + + label + + + = + + + "Button" + + + + + + + + /> + +
+
+ + <FlowTypeButton + + + + + + label + + + = + + + "Flow Typed Button" + + + + + + + + /> + +
+
+ + </div> + +
+
+
+
+
+

+ Prop Types +

+
+

+ "BaseButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + + + + - + + + { + + false + + } + + + +
+ label + + + + + + yes + + - + + +
+ onClick + + + + + + - + + + { + + onClick() + + } + + + +
+ style + + + + + + - + + + { + + {} + + } + + + +
+
+
+
+
+
+
+`; + +exports[`Storyshots Addons|Info.Options.source Shows or hides Info Addon source 1`] = ` +
+
+ +
+ +
+ +
+
+
+

+ Addons|Info.Options.source +

+

+ Shows or hides Info Addon source +

+
+
+
+ The Info Addon source section should be hidden +
+
+
+

+ Prop Types +

+
+

+ "BaseButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + + + + - + + + { + + false + + } + + + +
+ label + + + + + + yes + + - + + +
+ onClick + + + + + + - + + + { + + onClick() + + } + + + +
+ style + + + + + + - + + + { + + {} + + } + + + +
+
+
+
+
+
+
+`; + +exports[`Storyshots Addons|Info.Options.styles Change info styles // I think this is broken or I am using it wrong? 1`] = ` +
+
+ +
+ +
+ +
+
+
+

+ Addons|Info.Options.styles +

+

+ Change info styles // I think this is broken or I am using it wrong? +

+
+
+

+ Story Source +

+
+            
+ + <BaseButton + + + + + + label + + + = + + + "Button" + + + + + + + + /> + +
+
+
+
+

+ Prop Types +

+
+

+ "BaseButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + + + + - + + + { + + false + + } + + + +
+ label + + + + + + yes + + - + + +
+ onClick + + + + + + - + + + { + + onClick() + + } + + + +
+ style + + + + + + - + + + { + + {} + + } + + + +
+
+
+
+
+
+
+`; + +exports[`Storyshots Addons|Info.React Docgen Comments from Flow declarations 1`] = ` +
+
+ +
+ +
+ +
+
+
+

+ Addons|Info.React Docgen +

+

+ Comments from Flow declarations +

+
+
+
+ Comments above the Flow declarations should be extracted from the React component file itself and rendered in the Info Addon prop table +
+
+
+

+ Story Source +

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

+ Prop Types +

+
+

+ "FlowTypeButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + unknown + + + - + + + { + + false + + } + + + +
+ onClick + + + unknown + + + - + + + { + + onClick() + + } + + + +
+
+
+
+
+
+
+`; + +exports[`Storyshots Addons|Info.React Docgen Comments from PropType declarations 1`] = ` +
+
+ +
+ +
+ +
+
+
+

+ Addons|Info.React Docgen +

+

+ Comments from PropType declarations +

+
+
+
+ Comments above the PropType declarations should be extracted from the React component file itself and rendered in the Info Addon prop table +
+
+
+

+ Story Source +

+
+            
+ + <DocgenButton + + + + + + onClick + + + = + + + { + + clicked() + + } + + + + + + + + label + + + = + + + "Docgen Button" + + + + + + + + /> + +
+
+
+
+

+ Prop Types +

+
+

+ "DocgenButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + + + + - + + + { + + false + + } + + + +
+ label + + + + + + yes + + - + + +
+ onClick + + + + + + - + + + { + + onClick() + + } + + + +
+ one + + + + + + - + + - + + +
+ two + + + + + + - + + - + + +
+ obj + + + + + + - + + - + + +
+ shape + + + + + + - + + - + + +
+ arrayOf + + + + + + - + + - + + +
+ msg + + + + + + - + + - + + +
+ enm + + + + + + - + + - + + +
+ union + + + + + + - + + - + + +
+
+
+
+
+
+
+`; + +exports[`Storyshots Addons|Info.React Docgen Comments from component declaration 1`] = ` +
+
+ +
+ +
+ +
+
+
+

+ Addons|Info.React Docgen +

+

+ Comments from component declaration +

+
+
+
+ Comments above the component declaration should be extracted from the React component file itself and rendered below the Info Addon heading +
+
+
+

+ Story Source +

+
+            
+ + <BaseButton + + + + + + onClick + + + = + + + { + + clicked() + + } + + + + + + + + label + + + = + + + "Button" + + + + + + + + /> + +
+
+
+
+

+ Prop Types +

+
+

+ "BaseButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + + + + - + + + { + + false + + } + + + +
+ label + + + + + + yes + + - + + +
+ onClick + + + + + + - + + + { + + onClick() + + } + + + +
+ style + + + + + + - + + + { + + {} + + } + + + +
+
+
+
+
+
+
+`; diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-jest.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-jest.stories.storyshot index 652ddaa6b0a7..d506f84bd937 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-jest.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-jest.stories.storyshot @@ -7,3 +7,11 @@ exports[`Storyshots Addon jest withTests 1`] = `

`; + +exports[`Storyshots Addons|jest withTests 1`] = ` +
+

+ Hello +

+
+`; diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-knobs.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-knobs.stories.storyshot index 13c5217a6ad9..5e58eb02eff8 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-knobs.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-knobs.stories.storyshot @@ -105,3 +105,109 @@ exports[`Storyshots Addon Knobs.withKnobsOptions tweaks static values with debou

`; + +exports[`Storyshots Addons|Knobs.withKnobs triggers actions via button 1`] = ` +
+

+ Hit the knob load button and it should trigger an async load after a short delay +

+

+ No items loaded +

+
+`; + +exports[`Storyshots Addons|Knobs.withKnobs tweaks static values 1`] = ` +
+

+ My name is Storyteller, I'm 70 years old, and my favorite fruit is apple. +

+

+ My birthday is: January 20, 2017 +

+

+ I live in NY for 9 years. +

+

+ My wallet contains: $12.50 +

+

+ In my backpack, I have: +

+ +

+ Nice to meet you! +

+
+ + +

+ PS. My shirt pocket contains: +

+
+`; + +exports[`Storyshots Addons|Knobs.withKnobsOptions triggers actions via button with debounce delay 1`] = ` +
+

+ Hit the knob load button and it should trigger an async load after a short delay +

+

+ No items loaded +

+
+`; + +exports[`Storyshots Addons|Knobs.withKnobsOptions tweaks static values with debounce delay 1`] = ` +
+

+ If you are encountering performance issues with state updating too often, use withKnobsOptions to debounce changes. +

+

+ My name is Storyteller, I'm 70 years old, and my favorite fruit is apple. +

+

+ My birthday is: January 20, 2017 +

+

+ My wallet contains: $12.50 +

+

+ In my backpack, I have: +

+ +

+ Nice to meet you! +

+
+ + +

+ PS. My shirt pocket contains: +

+
+`; diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-notes.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-notes.stories.storyshot index 9c221f6c80ab..81428476a2d3 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-notes.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-notes.stories.storyshot @@ -17,3 +17,21 @@ exports[`Storyshots Addon Notes withNotes rendering imported markdown 1`] = ` Button with notes - check the notes panel for details `; + +exports[`Storyshots Addons|Notes using deprecated API 1`] = ` + +`; + +exports[`Storyshots Addons|Notes withNotes 1`] = ` + +`; + +exports[`Storyshots Addons|Notes withNotes rendering imported markdown 1`] = ` + +`;