ec3ca398cb
We introduced the `StyleRegistry` on server side to make it concurrent safe for requests. For client we can have only 1 registry since there's only 1 instance per browser window. Keep consistence with previous usage Closes vercel/next.js#32417 Closes vercel/next.js#30377 Revert change in #31357, it's not required anymore |
||
---|---|---|
.. | ||
.storybook | ||
components | ||
pages | ||
public | ||
stories | ||
styles | ||
.babelrc | ||
.gitignore | ||
next-env.d.ts | ||
package.json | ||
README.md | ||
tsconfig.json |
Example app with Storybook setup for SCSS in Styled-jsx
This example shows Styled-jsx (with SCSS) working for components written in TypeScript rendered both inside and outside of Storybook.
Preview
Preview the example live on StackBlitz:
Deploy your own
Deploy the example using Vercel:
How to use
Execute create-next-app
with npm or Yarn to bootstrap the example:
npx create-next-app --example with-storybook-styled-jsx-scss with-storybook-styled-jsx-scss-app
# or
yarn create next-app --example with-storybook-styled-jsx-scss with-storybook-styled-jsx-scss-app
Run Storybook
npm run storybook
# or
yarn storybook
Build Static Storybook
npm run build-storybook
# or
yarn build-storybook
You can use Vercel to deploy Storybook. Specify storybook-static
as the output directory.
Notes
This example combines the following examples, with some required extra config added: