Skip to content

Commit

Permalink
Consolidate snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
kylegach committed Jan 30, 2024
1 parent fd87a7f commit b644216
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 43 deletions.
10 changes: 0 additions & 10 deletions docs/snippets/common/subcomponents-in-meta.js.mdx

This file was deleted.

15 changes: 0 additions & 15 deletions docs/snippets/common/subcomponents-in-meta.ts-4-9.mdx

This file was deleted.

15 changes: 0 additions & 15 deletions docs/snippets/common/subcomponents-in-meta.ts.mdx

This file was deleted.

13 changes: 10 additions & 3 deletions docs/writing-docs/autodocs.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,21 @@ Autodocs allows you to document your "main" component, defined by the `component

<CodeSnippets
paths={[
'common/subcomponents-in-meta.js.mdx',
'common/subcomponents-in-meta.ts.mdx'
'react/list-story-with-subcomponents.js.mdx',
'react/list-story-with-subcomponents.ts.mdx',
'angular/list-story-with-subcomponents.ts.mdx',
'vue/list-story-with-sub-components.js.mdx',
'vue/list-story-with-sub-components.ts.mdx',
'web-components/list-story-with-subcomponents.js.mdx',
'web-components/list-story-with-subcomponents.ts.mdx',
]}
usesCsf3
csf2Path="writing-stories/stories-for-multiple-components#snippet-list-story-with-subcomponents"
/>

<!-- prettier-ignore-end -->

![Subcomponents in ArgTypes doc block](./doc-block-arg-types-subcomponents.png)
![Subcomponents in ArgTypes doc block](../writing-stories/doc-block-arg-types-subcomponents-for-list.png)

The main component and its subcomponents will show up in a tabbed version of the [`ArgTypes` doc block](./doc-blocks.md#argtypes). The tab titles will correspond to the keys of the `subcomponents` object.

Expand Down
Binary file not shown.

0 comments on commit b644216

Please sign in to comment.