summaryrefslogtreecommitdiff
path: root/examples/with-tailwindcss/src/components/Button.astro
diff options
context:
space:
mode:
Diffstat (limited to 'examples/with-tailwindcss/src/components/Button.astro')
-rw-r--r--examples/with-tailwindcss/src/components/Button.astro5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/with-tailwindcss/src/components/Button.astro b/examples/with-tailwindcss/src/components/Button.astro
index 64baa50ae..966c613aa 100644
--- a/examples/with-tailwindcss/src/components/Button.astro
+++ b/examples/with-tailwindcss/src/components/Button.astro
@@ -1,3 +1,6 @@
-<button class="py-2 px-4 bg-green-500 text-white font-semibold rounded-lg shadow-md hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-400 focus:ring-opacity-75">
+---
+let { type = 'button' } = Astro.props;
+---
+<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" type={type}>
<slot />
</button>