summaryrefslogtreecommitdiff
path: root/www/src/components/BlogPost.astro
diff options
context:
space:
mode:
authorGravatar Nate Moore <natemoo-re@users.noreply.github.com> 2021-06-24 17:48:24 -0500
committerGravatar GitHub <noreply@github.com> 2021-06-24 17:48:24 -0500
commita136c85e6b2b0445e48184595b2696994621c8f1 (patch)
tree4d06743cf5b0e3f8f5dabcd1c8ae9e8b9b4557b2 /www/src/components/BlogPost.astro
parentbc9e0f180ccec7d48fde49c857188543e007bf14 (diff)
downloadastro-a136c85e6b2b0445e48184595b2696994621c8f1.tar.gz
astro-a136c85e6b2b0445e48184595b2696994621c8f1.tar.zst
astro-a136c85e6b2b0445e48184595b2696994621c8f1.zip
New Props API (#515)
* wip: update props api * feat(#139, #309): enable new props api * chore: migrate examples to new props API * docs: update syntax guide for new props API * chore: update examples to new props API * chore: update docs to new Props API * fix: hide __astroInternal from `Astro.props` consumers * chore: remove scratchpad file * chore: fix script error * test: fix failing collection tests * fix: set __astroInternal to `enumerable: false` * chore: add changeset * feat: warn users using old props api
Diffstat (limited to 'www/src/components/BlogPost.astro')
-rw-r--r--www/src/components/BlogPost.astro12
1 files changed, 8 insertions, 4 deletions
diff --git a/www/src/components/BlogPost.astro b/www/src/components/BlogPost.astro
index 0884c6575..04d8e4324 100644
--- a/www/src/components/BlogPost.astro
+++ b/www/src/components/BlogPost.astro
@@ -2,10 +2,14 @@
import Author from './Author.astro';
import GithubStarButton from './GithubStarButton.astro';
-export let title: string;
-export let author: string;
-export let publishDate: string;
-export let heroImage: string;
+export interface Props {
+ title: string;
+ author: string;
+ publishDate: string;
+ heroImage: string;
+}
+
+const { title, author, publishDate, heroImage } = Astro.props;
---
<div class="layout">