diff --git a/examples/basics/src/components/Card.astro b/examples/basics/src/components/Card.astro new file mode 100644 index 000000000..7b911b395 --- /dev/null +++ b/examples/basics/src/components/Card.astro @@ -0,0 +1,75 @@ +--- +export interface Props { + title: string, + body: string, + href: string, +} +const {href, title, body} = Astro.props; +--- + + \ No newline at end of file diff --git a/examples/basics/src/components/Layout.astro b/examples/basics/src/layouts/Layout.astro similarity index 96% rename from examples/basics/src/components/Layout.astro rename to examples/basics/src/layouts/Layout.astro index cf1c00262..fe43c7e27 100644 --- a/examples/basics/src/components/Layout.astro +++ b/examples/basics/src/layouts/Layout.astro @@ -27,6 +27,7 @@ const { title } = Astro.props as Props; --color-text: hsl(12, 5%, 4%); --color-bg: hsl(10, 21%, 95%); + --color-border: hsl(17, 24%, 90%); } html { diff --git a/examples/basics/src/pages/index.astro b/examples/basics/src/pages/index.astro index 605f8cf2c..ea7401f11 100644 --- a/examples/basics/src/pages/index.astro +++ b/examples/basics/src/pages/index.astro @@ -1,81 +1,35 @@ --- -import Layout from '../components/Layout.astro'; +import Layout from '../layouts/Layout.astro'; +import Card from '../components/Card.astro'; --- -

Welcome to Astro

-

Your first mission: tweak this message to try our hot module reloading. Check the src/pages directory!

+

+ Check out the src/pages directory to get started.
+ Code Challenge: Tweak the "Welcome to Astro" message above. +