Skip to content

Commit

Permalink
chore(docs): Add note to Storybook guide about StaticImage (#33127)
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts committed Sep 10, 2021
1 parent 4ff5026 commit eb552d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/docs/how-to/testing/visual-testing-with-storybook.md
Expand Up @@ -162,6 +162,8 @@ Storybook v6 has [out-of-the-box support for TypeScript](https://storybook.js.or

A complete guide to writing stories is beyond the scope of this guide, but we'll take a look at creating a story.

> **Note:** Writing stories for components that use `StaticImage` from `gatsby-plugin-image` is currently not supported. Contributions to making this possible are welcome.
First, create the story file. Storybook looks for all files with a `.stories.js` extension and loads them into Storybook for you. Generally, you will want your stories near where the component is defined. However, since this is Gatsby, you will have to create those files outside the `pages` directory if you want stories for your pages.

A good solution is to use the `stories` directory which was created when Storybook was installed and put any page stories in there.
Expand Down

0 comments on commit eb552d1

Please sign in to comment.