Unverified Commit 0afc1d2b authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

Fix storybook styled-jsx example with styled-jsx 5 (#31357)

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`

x-ref: https://github.com/vercel/styled-jsx/issues/761

Since next.js is using styled-jsx v5 beta now, it requires wrapping a `StyleRegistry` component on the root top.
ref: [styled-jsx doc](https://github.com/vercel/styled-jsx/tree/beta#server-side-rendering)
parent 61ca7369
import { StyleRegistry } from 'styled-jsx'
export const decorators = [
(Story) => (
<StyleRegistry>
<Story />
</StyleRegistry>
),
]
export const parameters = { export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' }, actions: { argTypesRegex: '^on[A-Z].*' },
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"build-storybook": "build-storybook --no-dll" "build-storybook": "build-storybook --no-dll"
}, },
"dependencies": { "dependencies": {
"next": "^10.0.0", "next": "latest",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment