1.3.0 • Published 4 years ago

storybook-addon-r2request v1.3.0

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
4 years ago

How to use with storybook

Install the package

npm install -D storybook-addon-r2request

Edit the config.js

Add the following code:

import { withR2Request } from "storybook-addon-r2request/lib/index";

addDecorator(withR2Request);

Edit the addons.js

Add the following code

import 'storybook-addon-r2request/lib/register';

Edit the middleware.js

const { register: registerR2Request } = require("storybook-addon-r2request/lib/middleware");

module.exports = function expressMiddleware(app) {
  registerR2Request(app);
};

Next

Support edit match request in story configurations