New
Storybook for full-stack developersAutomate with Chromatic
Star75,295
Back to integrations
Add your integration
Categories
  • ⭐️ Popular
  • 🧩 Essentials
  • 🛠 Code
  • ⚡️ Data & state
  • ✅ Test
  • 💅 Style
  • 🎨 Design
  • ⚙️ Appearance
  • 🗄 Organize
How to install addons Create an addon
storybook-addon-r2request
Storybook addon record request addon for storybook
npm install storybook-addon-r2request
Last updated about 3 years ago
1
Downloads per week
Readme View on GitHub

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

Join the community
5,867 developers and counting
WhyWhy StorybookComponent-driven UI
Open source software
Storybook

Maintained by
Chromatic
Special thanks to Netlify and CircleCI