diff options
author | 2021-06-24 17:48:24 -0500 | |
---|---|---|
committer | 2021-06-24 17:48:24 -0500 | |
commit | a136c85e6b2b0445e48184595b2696994621c8f1 (patch) | |
tree | 4d06743cf5b0e3f8f5dabcd1c8ae9e8b9b4557b2 /examples/portfolio/src | |
parent | bc9e0f180ccec7d48fde49c857188543e007bf14 (diff) | |
download | astro-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 'examples/portfolio/src')
-rw-r--r-- | examples/portfolio/src/components/MainHead.astro | 2 | ||||
-rw-r--r-- | examples/portfolio/src/layouts/project.astro | 2 | ||||
-rw-r--r-- | examples/portfolio/src/pages/$projects.astro | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/examples/portfolio/src/components/MainHead.astro b/examples/portfolio/src/components/MainHead.astro index c400b34e6..181da7d28 100644 --- a/examples/portfolio/src/components/MainHead.astro +++ b/examples/portfolio/src/components/MainHead.astro @@ -1,5 +1,5 @@ --- -export let title = 'Jeanine White: Personal Site'; +const { title = 'Jeanine White: Personal Site' } = Astro.props; --- <meta charset="UTF-8"> diff --git a/examples/portfolio/src/layouts/project.astro b/examples/portfolio/src/layouts/project.astro index 7ca9734a4..4ebfed8e1 100644 --- a/examples/portfolio/src/layouts/project.astro +++ b/examples/portfolio/src/layouts/project.astro @@ -4,7 +4,7 @@ import Button from '../components/Button/index.jsx'; import Footer from '../components/Footer/index.jsx'; import Nav from '../components/Nav/index.jsx'; -export let content: any; +const { content } = Astro.props; --- <html> <head> diff --git a/examples/portfolio/src/pages/$projects.astro b/examples/portfolio/src/pages/$projects.astro index 5fd00d3c2..9a3407b83 100644 --- a/examples/portfolio/src/pages/$projects.astro +++ b/examples/portfolio/src/pages/$projects.astro @@ -4,7 +4,7 @@ import Footer from '../components/Footer/index.jsx'; import Nav from '../components/Nav/index.jsx'; import PortfolioPreview from '../components/PortfolioPreview/index.jsx'; -export let collection; +let { collection } = Astro.props; export async function createCollection() { return { async data() { |