2.0.1 • Published 4 years ago

@storybook-addons/docs v2.0.1

Weekly downloads
126
License
MIT
Repository
github
Last release
4 years ago

@storybook-addons/docs · npm (scoped)

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

  1. Add @storybook/addon-docs into addons in main.js file:
module.exports = {
  addons: ['@storybook/addon-docs'],
}
  1. Set DocsPage in preview.js file:
import { addParameters } from '@storybook/react'
import { DocsPage } from '@storybook-addons/docs'

addParameters({
  docs: {
    container: DocsPage,
  },
})
  1. Add documentation for your story:
import documentation from './Component.md'

export default {
  title: 'Controls/Component',
  parameters: {
    docs: {
      readme: documentation,
    },
  },
}

Params

OptionDescriptionDefault
enableNavigationShow navigation at right sidebartrue
readmeDocumentation content
placeholdersObject 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