storybook/docs/snippets/common/storybook-addons-api-on.js.mdx

7 lines
157 B
Plaintext

```js
// /my-addon/register.js
addons.register('my-organisation/my-addon', (api) => {
api.on('some-event', (eventData) => console.log(eventData));
});
```