summaryrefslogtreecommitdiff
path: root/examples/with-tailwindcss/src
diff options
context:
space:
mode:
authorGravatar Drew Powers <1369770+drwpow@users.noreply.github.com> 2021-11-04 14:01:28 -0600
committerGravatar GitHub <noreply@github.com> 2021-11-04 14:01:28 -0600
commit2e1bded735f3e2149c3ff95b1c131a147dda0f34 (patch)
tree1f4433cad8db49e5be6ae8bbc4f277de9d5fa7e0 /examples/with-tailwindcss/src
parent2c5e67bb44398080037c02fbdd756cc66e757f1e (diff)
downloadastro-2e1bded735f3e2149c3ff95b1c131a147dda0f34.tar.gz
astro-2e1bded735f3e2149c3ff95b1c131a147dda0f34.tar.zst
astro-2e1bded735f3e2149c3ff95b1c131a147dda0f34.zip
Get Tailwind HMR working (first cut) (#1736)
* Get Tailwind HMR working * PR feedback * perf: improve HMR `head` performance Co-authored-by: Nate Moore <nate@skypack.dev>
Diffstat (limited to 'examples/with-tailwindcss/src')
-rw-r--r--examples/with-tailwindcss/src/components/Button.astro5
-rw-r--r--examples/with-tailwindcss/src/pages/index.astro4
2 files changed, 5 insertions, 4 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>
diff --git a/examples/with-tailwindcss/src/pages/index.astro b/examples/with-tailwindcss/src/pages/index.astro
index 10f370ba3..28d5f3dec 100644
--- a/examples/with-tailwindcss/src/pages/index.astro
+++ b/examples/with-tailwindcss/src/pages/index.astro
@@ -8,9 +8,7 @@ import Button from '../components/Button.astro';
<html lang="en">
<head>
<meta charset="UTF-8" />
-
- <link rel="icon" type="image/x-icon" href="/favicon.ico" />
-
+ <link rel="icon" type="image/x-icon" href="/favicon.ico" />
<title>Astro + TailwindCSS</title>
<link rel="stylesheet" type="text/css" href={Astro.resolve("../styles/global.css")}>
</head>