summaryrefslogtreecommitdiff
path: root/examples/basics/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/basics/src')
-rw-r--r--examples/basics/src/components/Card.astro4
-rw-r--r--examples/basics/src/pages/index.astro1
2 files changed, 4 insertions, 1 deletions
diff --git a/examples/basics/src/components/Card.astro b/examples/basics/src/components/Card.astro
index 4039d4f4f..aea28c83f 100644
--- a/examples/basics/src/components/Card.astro
+++ b/examples/basics/src/components/Card.astro
@@ -4,7 +4,8 @@ export interface Props {
body: string;
href: string;
}
-const { href, title, body } = Astro.props;
+
+const { href, title, body } = Astro.props as Props;
---
<li class="link-card">
@@ -69,6 +70,7 @@ const { href, title, body } = Astro.props;
}
.link-card:is(:hover, :focus-within) h2 span {
+ will-change: transform;
transform: translateX(2px);
}
</style>
diff --git a/examples/basics/src/pages/index.astro b/examples/basics/src/pages/index.astro
index cf05f0bb6..1ca6b285c 100644
--- a/examples/basics/src/pages/index.astro
+++ b/examples/basics/src/pages/index.astro
@@ -86,6 +86,7 @@ import Card from "../components/Card.astro";
border-radius: 4px;
padding: 0.15em 0.25em;
}
+
.link-card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr));