prismicio-community / storybook-addon-gatsby

Storybook addon used to load stories built with Gatsby
Apache License 2.0
7 stars 6 forks source link

feat: add Static Queries support #5

Closed angeloashmore closed 2 years ago

angeloashmore commented 2 years ago

Types of changes

Description

This adds Static Query support. It enables the use of Gatsby's useStaticQuery() and <StaticQuery> in Stories.

Gatsby's development server must be running for Static Queries to be available in Storybook. Alternatively, the Gatsby project can be built ahead of starting Storybook.

Related thread: https://community.prismic.io/t/storybook-addon-gatsby-how-to-override-options-in-babel-plugin-remove-graphql-queries-fix-loading-staticquery-in-storybook/8763

Checklist:

📕