mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-10 00:12:22 +08:00
- Based on - https://github.com/storybookjs/storybook/tree/next/code/frameworks/nextjs - https://storybook.js.org/blog/integrate-nextjs-and-storybook-automatically/
22 lines
389 B
Plaintext
22 lines
389 B
Plaintext
```js
|
|
// .storybook/preview.js
|
|
|
|
export default {
|
|
// ...
|
|
parameters: {
|
|
// ...
|
|
nextjs: {
|
|
router: {
|
|
push(...args) {
|
|
// Custom logic can go here
|
|
// This logs to the Actions panel
|
|
action('nextRouter.push')(...args);
|
|
// Return whatever you want here
|
|
return Promise.resolve(true);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
```
|