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

10 lines
191 B
Plaintext

```js
// /my-addon/register.js
addons.register('my-organisation/my-addon', (api) => {
const href = api.getUrlState({
selectedKind: 'kind',
selectedStory: 'story',
}).url;
});
```