percy / percy-storybook

Percy's Storybook SDK.
https://docs.percy.io/docs/storybook
MIT License
149 stars 45 forks source link

Update docs for storybook v6 #245

Closed quantizor closed 3 years ago

quantizor commented 3 years ago

https://docs.percy.io/v1/docs/storybook-for-react

v6 uses ESM module exports which seems like a pretty different pattern than what's outlined in the docs

Robdel12 commented 3 years ago

Hey @probablyup it looks like you're linking to the old v1 docs. These will be the docs you'll want for v5+ of storybook (and I don't think any changes from v5 to v6 will impact how the SDK works -- we're operating off of the static output): https://docs.percy.io/docs/storybook

quantizor commented 3 years ago

Ah ok, that's what came up when I googled. Might be worth setting up rel="canonical" or something of that nature so Google prefers the newer docs.

quantizor commented 3 years ago

@Robdel12 actually looking at those docs you linked, they're the same content. I determined the new pattern would be:

export const StoryName = () => <TestedComponent />

StoryName.parameters = {
  percy: { /* percy options go here */ }
}