mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
- Simplify navigation/router fn override guidance - Fix incorrect snippet - Consistently format headings
22 lines
397 B
Plaintext
22 lines
397 B
Plaintext
```js
|
|
// .storybook/preview.js
|
|
|
|
export default {
|
|
// ...
|
|
parameters: {
|
|
// ...
|
|
nextjs: {
|
|
navigation: {
|
|
push(...args) {
|
|
// Custom logic can go here
|
|
// This logs to the Actions panel
|
|
action('nextNavigation.push')(...args);
|
|
// Return whatever you want here
|
|
return Promise.resolve(true);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
```
|