summaryrefslogtreecommitdiff
path: root/examples/with-tailwindcss/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/with-tailwindcss/src')
-rw-r--r--examples/with-tailwindcss/src/components/Button.astro8
-rw-r--r--examples/with-tailwindcss/src/pages/index.astro19
2 files changed, 16 insertions, 11 deletions
diff --git a/examples/with-tailwindcss/src/components/Button.astro b/examples/with-tailwindcss/src/components/Button.astro
index 966c613aa..5e241c44f 100644
--- a/examples/with-tailwindcss/src/components/Button.astro
+++ b/examples/with-tailwindcss/src/components/Button.astro
@@ -1,6 +1,10 @@
---
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
+ 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}
+>
+ <slot />
</button>
diff --git a/examples/with-tailwindcss/src/pages/index.astro b/examples/with-tailwindcss/src/pages/index.astro
index 28d5f3dec..07262b870 100644
--- a/examples/with-tailwindcss/src/pages/index.astro
+++ b/examples/with-tailwindcss/src/pages/index.astro
@@ -5,15 +5,16 @@ import Button from '../components/Button.astro';
// Full Astro Component Syntax:
// https://docs.astro.build/core-concepts/astro-components/
---
+
<html lang="en">
- <head>
- <meta charset="UTF-8" />
- <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>
+ <head>
+ <meta charset="UTF-8" />
+ <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>
- <body>
- <Button>I’m a Tailwind Button!</Button>
- </body>
+ <body>
+ <Button>I’m a Tailwind Button!</Button>
+ </body>
</html>