Created
November 11, 2020 13:27
-
-
Save ricardomatias/e0a9c589fef65ee799d16f80866b69fd to your computer and use it in GitHub Desktop.
svelte
This file contains hidden or 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
| <script> | |
| export let text = null; | |
| let showText = false; | |
| setTimeout(() => (showText = true), 1000); | |
| </script> | |
| {#if text && showText} | |
| <p> | |
| {text} | |
| </p> | |
| {/if} |
This file contains hidden or 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
| import Hello from './Hello.svelte'; | |
| new Hello({ | |
| target: document.body, | |
| props: { | |
| text: 'foo bar' | |
| } | |
| }) | |
| new Hello({ | |
| target: document.body | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment