storybook icon indicating copy to clipboard operation
storybook copied to clipboard

How to show viewport on the docs page?

Open zaleGZL opened this issue 6 years ago • 2 comments

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
    }
})

zaleGZL avatar Dec 22 '19 04:12 zaleGZL

See #6700 for the general issue

shilman avatar Dec 22 '19 06:12 shilman

This is currently not yet possible, maybe after 7.0.

We're open to ideas on how to implement this.

ndelangen avatar Jan 17 '23 22:01 ndelangen