Skip to content

Commit

Permalink
Merge pull request #20477 from storybookjs/shilman/lit-add-script-sto…
Browse files Browse the repository at this point in the history
…ries

Web-components: Restore missing script stories
  • Loading branch information
shilman authored Jan 3, 2023
2 parents 7f72560 + fa4337b commit e2c502b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions code/renderers/web-components/template/stories/script.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { html } from 'lit';

export default {
component: undefined,
};

export const InTemplate = () => html`
<div>JS alert</div>
<script>
alert('hello');
</script>
`;

export const InString = () => '<div>JS alert</div><script>alert("hello")</script>';

export const TypeModule = () =>
'<div>JS alert from module</div><script type="module">alert("hello from module"); export const a = 1;</script>';

0 comments on commit e2c502b

Please sign in to comment.