From 59728dd64a4586d729a31d5b0daae2e4bd532c0d Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Sun, 11 Jul 2021 22:55:41 -0400 Subject: [PATCH] wip --- .../portfolio/src/components/MainHead.astro | 15 +- examples/portfolio/src/layouts/project.astro | 4 +- examples/portfolio/src/pages/index.astro | 235 +----------------- packages/astro/src/compiler/index.ts | 22 +- 4 files changed, 26 insertions(+), 250 deletions(-) diff --git a/examples/portfolio/src/components/MainHead.astro b/examples/portfolio/src/components/MainHead.astro index 181da7d28d..2dae9ac046 100644 --- a/examples/portfolio/src/components/MainHead.astro +++ b/examples/portfolio/src/components/MainHead.astro @@ -1,9 +1,16 @@ --- -const { title = 'Jeanine White: Personal Site' } = Astro.props; ---- +export interface Props { + title: string; + description?: string[]; +} +export function __state({props}: {props: Props}) { + return {description: props.description || 'This is the default site descrition.'}; +} +--- -{title} +{$props.title} + - + \ No newline at end of file diff --git a/examples/portfolio/src/layouts/project.astro b/examples/portfolio/src/layouts/project.astro index 4ebfed8e11..233bdc6371 100644 --- a/examples/portfolio/src/layouts/project.astro +++ b/examples/portfolio/src/layouts/project.astro @@ -3,12 +3,10 @@ import MainHead from '../components/MainHead.astro'; import Button from '../components/Button/index.jsx'; import Footer from '../components/Footer/index.jsx'; import Nav from '../components/Nav/index.jsx'; - -const { content } = Astro.props; --- - + -