storybook/docs/snippets/common/storybook-addons-api-useapi.js.mdx
2022-03-18 10:27:04 +01:00

13 lines
236 B
Plaintext

```js
// /my-addon/manager.js
import React from 'react';
import { useStorybookApi } from '@storybook/api';
export const Panel = () => {
const state = useStorybookApi();
return <div>do something with storybook's api</div>;
};
```