mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-10 00:12:22 +08:00
Fix withLinks decorator
This commit is contained in:
parent
5040a7c6d0
commit
66067cc965
@ -38,7 +38,7 @@ export const hrefTo = (kind: string, name: string): Promise<string> =>
|
|||||||
});
|
});
|
||||||
|
|
||||||
const linksListener = (e: SyntheticEvent<HTMLLinkElement>) => {
|
const linksListener = (e: SyntheticEvent<HTMLLinkElement>) => {
|
||||||
const { sbKind: kind, sbStory: story } = e.currentTarget.dataset;
|
const { sbKind: kind, sbStory: story } = e.target.dataset;
|
||||||
if (kind || story) {
|
if (kind || story) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
navigate({ kind, story });
|
navigate({ kind, story });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user