diff options
author | 2022-04-02 12:34:25 -0500 | |
---|---|---|
committer | 2022-04-02 12:34:25 -0500 | |
commit | d55658f061bc4d95efa53e658cfbe407d94af284 (patch) | |
tree | 7d21e2178d95e794c502881f6110256e0a9e972a /examples/with-tailwindcss/src/components/Button.astro | |
parent | 42760e07ca40b57f19a74a638daece81085f0dee (diff) | |
download | astro-d55658f061bc4d95efa53e658cfbe407d94af284.tar.gz astro-d55658f061bc4d95efa53e658cfbe407d94af284.tar.zst astro-d55658f061bc4d95efa53e658cfbe407d94af284.zip |
Implement new default `script` behavior, `style is:global` (#2961)
* feat: implement RFC0016
* chore: update to latest compiler
* chore: update compiler
* test: fix script tests
* test: update public tests
* feat: throw a warning when referencing scripts in `public/` without `is:inline`
Diffstat (limited to 'examples/with-tailwindcss/src/components/Button.astro')
-rw-r--r-- | examples/with-tailwindcss/src/components/Button.astro | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/with-tailwindcss/src/components/Button.astro b/examples/with-tailwindcss/src/components/Button.astro index 11c605a2f..7d11c37ea 100644 --- a/examples/with-tailwindcss/src/components/Button.astro +++ b/examples/with-tailwindcss/src/components/Button.astro @@ -5,7 +5,8 @@ <button class="py-2 px-4 bg-purple-500 text-white font-semibold rounded-lg shadow-md hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-400 focus:ring-opacity-75"> <slot /> </button> -<script hoist> + +<script> import confetti from 'canvas-confetti'; document.body.querySelector('button').addEventListener("click", () => confetti()); -</script>
\ No newline at end of file +</script> |