storybook-addon-r2request

    1.3.0 • Public • Published

    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

    Keywords

    Install

    npm i storybook-addon-r2request

    DownloadsWeekly Downloads

    1

    Version

    1.3.0

    License

    Apache-2.0

    Unpacked Size

    19.7 kB

    Total Files

    6

    Last publish

    Collaborators

    • phucpnt