storybook/docs/snippets/common/storybook-fix-imports-autodocs-monorepo.js.mdx
Kyle Gach 975ad7604b Update TOC to use heading type
- Rename `introduction.md`, `overview.md`, `how-to-contribute.md` pages -> `index.md` pages
- Add all-new `index.md` pages for Sharing and API
- Find/replace `introduction.md`/`overview.md` -> `index.md`
- Find/replace `/introduction`/`/overview` -> `/`
- Add `hideRendererSelector: true` to frontmatter of (some) pages that aren't conditional on renderer
2023-11-27 20:57:51 -07:00

19 lines
518 B
Plaintext

```js
// MyComponent.stories.js|jsx
// ❌ Don't use the package's index file to import the component.
import { MyComponent } from '@component-package';
// ✅ Use the component's export to import it directly.
import { MyComponent } from '@component-package/src/MyComponent';
export default {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/configure/#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'MyComponent',
component: MyComponent,
};
```