storybookjs/storybook

How to show viewport on the docs page?

オープン

#9,218 opened on 2019/12/22

 (2 件のコメント) (16 件のリアクション) (0 人の担当者)TypeScript (10,058 件のフォーク)batch import
addon: docsaddon: viewporthelp wantedmediumtriage:reviewed

Repository metrics

Stars
 (89,909 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Describe the bug How to show viewport on the docs page? The canvas page has viewport options,But the documentation page is not。Is this a bug or does it require additional configuration?

Screenshots The canvas page has viewport options. image

But the documentation page is not。 image

Code snippets

import { configure, addParameters } from '@storybook/react'
import { DocsPage, DocsContainer } from '@storybook/addon-docs/blocks'
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport'
import '../src/index.less'

addParameters({
    viewport: {
        viewports: INITIAL_VIEWPORTS
    },
    docs: {
        container: DocsContainer,
        page: DocsPage
    }
})

コントリビューターガイド