Storybook Addon Scissors
Requires storybook version 3+
Install
npm i -D storybook-addon-scissors
Usage
- Download and import device list from ChromeDevTools devices (or bring your own with instructions below)
- Create or open
.storybook/addons.js
and register the addon like below.
// addons.js;;; // registerScissors() takes an array of device objects with the following signature:// [{// uid: String (must be unique)// title: String// width: Number// height: Number// }]// In the case of using the device list from ChromeDevTools,// we can map them the following way.const devices = devicesJSONextensions; ;