Socket
Book a DemoInstallSign in
Socket

@etchteam/storybook-addon-bugherd

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@etchteam/storybook-addon-bugherd

Add a Bugherd feedback button to the storybook UI

latest
Source
npmnpm
Version
1.0.3
Version published
Weekly downloads
33
6.45%
Maintainers
3
Weekly downloads
 
Created
Source

Storybook Addon Bugherd

Storybook Status Addon can be used to add a Bugherd feedback button in Storybook.

React Storybook Screenshot

Installation

npm install @etchteam/storybook-addon-bugherd --save-dev

Configuration

Create a file called main.js in your storybook config.

Add the following content to it:

module.exports = {
  addons: ['@etchteam/storybook-addon-bugherd/register']
}

Next, add a file called preview-head.html in your storybook config folder and add this bugherd script to it.

<script>
  var BugHerdConfig = {
    feedback: {
      hide: true,
    }
  };
</script>
<script type="text/javascript" src="https://www.bugherd.com/sidebarv2.js?apikey=<BUGHERD_API_KEY>" async="true"></script>

Finally, in preview.js or config.js (depending on how you have set up storybook) in your storybook folder, you'll need to add a global decorator.

import { addDecorator } from '@storybook/react';
import withBugherd from '@etchteam/storybook-addon-bugherd';

addDecorator(withBugherd);

You'll get a bugherd feedback button for anonymous users injected in the top toolbar.

Made with ☕ at Etch

Keywords

storybook

FAQs

Package last updated on 14 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts