storybook/docs/snippets/common/storybook-addons-api-useparameter.js.mdx
2020-08-11 01:11:41 +01:00

14 lines
271 B
Plaintext

```js
// .storybook/my-addon/register.js
export const Panel = () => {
const value = useParameter('parameter-key', 'default value');
return (
<div>
for the currently selected story, the parameter for "parameter-key" is:
{value}
</div>
);
};
```