2.0.1 • Published 5 years ago
@storybook-addons/docs v2.0.1
@storybook-addons/docs · 
Documentation layout for official @storybook/addon-docs with the ability to embed examples and placeholders.
Install
npm i -D @storybook-addons/docs @storybook/addon-docsUsage
- Add
@storybook/addon-docsinto addons inmain.jsfile:
module.exports = {
addons: ['@storybook/addon-docs'],
}- Set
DocsPageinpreview.jsfile:
import { addParameters } from '@storybook/react'
import { DocsPage } from '@storybook-addons/docs'
addParameters({
docs: {
container: DocsPage,
},
})- Add documentation for your story:
import documentation from './Component.md'
export default {
title: 'Controls/Component',
parameters: {
docs: {
readme: documentation,
},
},
}Params
| Option | Description | Default |
|---|---|---|
| enableNavigation | Show navigation at right sidebar | true |
| readme | Documentation content | |
| placeholders | Object with placeholder which should be replaced |
Markdown syntax
Inline stories
Your can embeded single or multipile stories (with tabs) in documentation:
<!-- single story -->
{{%story::story-id%}}
<!-- multi stories with tab names -->
{{%story::tabName:story-id|tabName:story-id%}}Placeholders
If necessary you can embedded placeholder for example other part of documentation:
{{%inject::placeholderName%}}License
Project is MIT licensed.
2.0.1
5 years ago
2.0.0
5 years ago
1.6.2-beta.17
5 years ago
1.6.3
5 years ago
1.6.3-beta.14
5 years ago
1.6.2
5 years ago
1.6.1
6 years ago
1.6.0
6 years ago
1.5.0
6 years ago
1.4.3
6 years ago
1.4.2
6 years ago
1.4.1
6 years ago
1.4.0
6 years ago
1.3.1-beta.8
6 years ago
1.3.1-beta.6
6 years ago
1.3.0
6 years ago
1.2.0
6 years ago
1.1.0
6 years ago
1.0.1-beta.88
6 years ago
1.0.0
6 years ago
0.0.1-alpha.76
6 years ago
0.0.1-alpha.74
6 years ago
0.0.1-alpha.65
6 years ago
0.0.1-alpha.54
6 years ago
0.0.1-alpha.53
6 years ago
0.0.1-alpha.46
6 years ago
0.0.1-alpha.45
6 years ago