mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 08:11:53 +08:00
30 lines
622 B
Plaintext
30 lines
622 B
Plaintext
```tsx
|
|
// Page.stories.ts|tsx
|
|
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
|
|
import { Page } from './Page';
|
|
|
|
//👇 Imports all Header stories
|
|
import * as HeaderStories from './Header.stories';
|
|
|
|
const meta = {
|
|
/* 👇 The title prop is optional.
|
|
* See https://storybook.js.org/docs/7.0/react/configure/overview#configure-story-loading
|
|
* to learn how to generate automatic titles
|
|
*/
|
|
title: 'Page',
|
|
|
|
component: Page,
|
|
} satisfies Meta<typeof Page>;
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const LoggedIn: Story = {
|
|
args: {
|
|
...HeaderStories.LoggedIn.args,
|
|
},
|
|
};
|
|
```
|