Socket
Socket
Sign inDemoInstall

@storybook/addon-decorator

Package Overview
Dependencies
134
Maintainers
5
Versions
489
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @storybook/addon-decorator

decorator addon for storybook


Version published
Maintainers
5
Install size
14.0 MB
Created

Readme

Source

example addon: decorator

This addon exposes a function users can use to wrap their storyFn with. This is called a decorator in storybook's terminology.

A decorator can perform analysis on the storyFn, detect how long it takes to render, detect side-effects, and have access to the storyContext.

It's also possible to wrap the results with some additional html/jsx or provide additional data to the storyFn.

Uses include:

  • do side-effects detection
  • wrap story with additional html
  • add data to storyFn

Keywords

FAQs

Last updated on 23 Apr 2021

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc