{"id":19267770,"url":"https://github.com/jhta/storybook-external-links","last_synced_at":"2025-04-21T19:33:10.330Z","repository":{"id":55754781,"uuid":"204467213","full_name":"jhta/storybook-external-links","owner":"jhta","description":"Decorator to add external links to storybook components after DOM rendering.","archived":false,"fork":false,"pushed_at":"2020-12-12T14:54:13.000Z","size":3,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T15:49:09.270Z","etag":null,"topics":["external-links","scripting","storybook"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-26T12:07:06.000Z","updated_at":"2023-01-27T21:34:37.000Z","dependencies_parsed_at":"2022-08-15T06:41:24.368Z","dependency_job_id":null,"html_url":"https://github.com/jhta/storybook-external-links","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhta%2Fstorybook-external-links","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhta%2Fstorybook-external-links/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhta%2Fstorybook-external-links/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhta%2Fstorybook-external-links/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhta","download_url":"https://codeload.github.com/jhta/storybook-external-links/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249830834,"owners_count":21331356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["external-links","scripting","storybook"],"created_at":"2024-11-09T20:14:01.750Z","updated_at":"2025-04-21T19:33:10.037Z","avatar_url":"https://github.com/jhta.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Storybook External Links\r\nDecorator to add external links to storybook components after DOM rendering.\r\n\r\n## Install\r\n\r\n```\r\nnpm install storybook-external-links\r\n```\r\n\r\n## How to use it?\r\n\r\n### React\r\n\r\n```js\r\n\r\nimport withExternalLinks from 'storybook-external-links'\r\n```\r\n\r\n### Vue\r\n\r\n```js\r\n\r\nimport withExternalLinks from 'storybook-external-links/vue'\r\n```\r\n### Use\r\n\r\n```js\r\n\r\nconst url = 'https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js'\r\n\r\n// script tag arguments - optional\r\nconst options = {\r\n async: true,\r\n}\r\n\r\nconst externalLinkDecorator = withExternalLinks(url, options)\r\n\r\nstoriesOf('Button')\r\n .addDecorator(externalLinkDecorator)\r\n .add(myStory)\r\n```\r\n\r\n### Result after story mounting:\r\n\r\n```html\r\n\u003cscript src=\"https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js\" async=\"\"\u003e\u003c/script\u003e\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhta%2Fstorybook-external-links","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhta%2Fstorybook-external-links","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhta%2Fstorybook-external-links/lists"}