2.0.1 • Published 4 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-docs
Usage
- Add
@storybook/addon-docs
into addons inmain.js
file:
module.exports = {
addons: ['@storybook/addon-docs'],
}
- Set
DocsPage
inpreview.js
file:
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
4 years ago
2.0.0
4 years ago
1.6.2-beta.17
4 years ago
1.6.3
4 years ago
1.6.3-beta.14
4 years ago
1.6.2
4 years ago
1.6.1
4 years ago
1.6.0
4 years ago
1.5.0
4 years ago
1.4.3
4 years ago
1.4.2
4 years ago
1.4.1
4 years ago
1.4.0
4 years ago
1.3.1-beta.8
4 years ago
1.3.1-beta.6
4 years ago
1.3.0
4 years ago
1.2.0
5 years ago
1.1.0
5 years ago
1.0.1-beta.88
5 years ago
1.0.0
5 years ago
0.0.1-alpha.76
5 years ago
0.0.1-alpha.74
5 years ago
0.0.1-alpha.65
5 years ago
0.0.1-alpha.54
5 years ago
0.0.1-alpha.53
5 years ago
0.0.1-alpha.46
5 years ago
0.0.1-alpha.45
5 years ago