storybook/docs/snippets/react/nextjs-navigation-override-in-story.ts.mdx
Kyle Gach 2ccd3470b9 Address comments
- Add missing filenames or titles to snippets
- Proper capitalization of terms like Webpack, Babel, PostCSS, etc.
- Fix some typos
- Split up complex snippets
- Document default parameter values
- Move acknowledgements back to README
2024-01-24 15:22:16 -07:00

34 lines
704 B
Plaintext

```ts
// NavigationBasedComponent.stories.ts
import { Meta, StoryObj } from '@storybook/react';
import NavigationBasedComponent from './NavigationBasedComponent';
const meta: Meta<typeof NavigationBasedComponent> = {
component: NavigationBasedComponent,
parameters: {
nextjs: {
appDirectory: true,
},
},
};
export default meta;
type Story = StoryObj<typeof NavigationBasedComponent>;
// If you have the actions addon,
// you can interact with the links and see the route change events there
export const Example: Story = {
parameters: {
nextjs: {
navigation: {
pathname: '/profile',
query: {
user: '1',
},
},
},
},
};
```