-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24400 from storybookjs/fix-links-stories
Addon-links: Fix stories
- Loading branch information
Showing
4 changed files
with
90 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { hrefTo } from '@storybook/addon-links'; | ||
|
||
export default { | ||
component: globalThis.Components.Html, | ||
title: 'hrefTo', | ||
parameters: { | ||
chromatic: { disable: true }, | ||
}, | ||
args: { | ||
content: '<div><code id="content">Waiting for hrefTo to resolve...</code></div>', | ||
}, | ||
}; | ||
|
||
export const Default = { | ||
play: async () => { | ||
const href = await hrefTo('addons-links-hrefto', 'target'); | ||
const content = document.querySelector('#content'); | ||
if (content) { | ||
content.textContent = href; | ||
} | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.