Merge pull request #20905 from mnigh/patch-1

docs: fix `MINIMAL_VIEWPORTS` links
This commit is contained in:
jonniebigodes 2023-02-02 21:32:51 +00:00 committed by GitHub
commit 3910a165d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,7 @@ The viewports object needs the following keys:
### Use a detailed set of devices
By default, Storybook uses a [minimal set of viewports](https://github.com/storybookjs/storybook/blob/master/addons/viewport/src/defaults.ts#L135) to get you started. But you're not restricted to these. The addon offers a more granular list of devices that you can use.
By default, Storybook uses a [minimal set of viewports](https://github.com/storybookjs/storybook/blob/next/code/addons/viewport/src/defaults.ts#L167) to get you started. But you're not restricted to these. The addon offers a more granular list of devices that you can use.
Change your [`.storybook/preview.js`](../configure/overview.md#configure-story-rendering) to the following:
@ -107,7 +107,7 @@ For instance, if you want to use these two with the minimal set of viewports, yo
<!-- prettier-ignore-end -->
Both viewports (`Kindle Fire 2` and `Kindle Fire HD`) will feature in the list of devices by merging them into the [`MINIMAL_VIEWPORTS`](https://github.com/storybookjs/storybook/blob/master/addons/viewport/src/defaults.ts#L135).
Both viewports (`Kindle Fire 2` and `Kindle Fire HD`) will feature in the list of devices by merging them into the [`MINIMAL_VIEWPORTS`](https://github.com/storybookjs/storybook/blob/next/code/addons/viewport/src/defaults.ts#L167).
### Configuring per component or story