diff options
Diffstat (limited to 'examples/with-tailwindcss')
-rw-r--r-- | examples/with-tailwindcss/package.json | 4 | ||||
-rw-r--r-- | examples/with-tailwindcss/src/components/Button.astro | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 04cfa9258..d15a3a81a 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -9,8 +9,8 @@ "preview": "astro preview" }, "devDependencies": { - "@astrojs/tailwind": "^0.0.2", - "astro": "^0.25.4", + "@astrojs/tailwind": "^0.1.0", + "astro": "^0.26.0", "autoprefixer": "^10.4.4", "canvas-confetti": "^1.5.1", "postcss": "^8.4.12", 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> |