diff options
author | 2021-12-17 08:47:59 -0500 | |
---|---|---|
committer | 2021-12-17 08:47:59 -0500 | |
commit | 033b70a7f8726e1b2cd365cbfe03fbf67a1e6a35 (patch) | |
tree | 243ff252f850347c9e19d635281e501125333ff6 /examples/component/demo/src | |
parent | bd246f0b2dc85ebff9de239cd56ceee362a2f97c (diff) | |
download | astro-033b70a7f8726e1b2cd365cbfe03fbf67a1e6a35.tar.gz astro-033b70a7f8726e1b2cd365cbfe03fbf67a1e6a35.tar.zst astro-033b70a7f8726e1b2cd365cbfe03fbf67a1e6a35.zip |
Add Component Example (#2203)
* Add Component Example
* chore(lint): Prettier fix
* nit: improve implementation
* nit: Update documentation
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'examples/component/demo/src')
-rw-r--r-- | examples/component/demo/src/pages/index.astro | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/examples/component/demo/src/pages/index.astro b/examples/component/demo/src/pages/index.astro new file mode 100644 index 000000000..96ca814e3 --- /dev/null +++ b/examples/component/demo/src/pages/index.astro @@ -0,0 +1,29 @@ +--- +import * as Component from '@example/my-component' +--- +<html lang="en"> + +<head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width" /> + <title>Welcome to Astro</title> + <style global> + h { + display: block; + font-size: 2em; + font-weight: bold; + margin-block: 0.67em; + } + </style> +</head> + +<body> + <Component.Heading> + Welcome to Astro + </Component.Heading> + <Component.Button> + Plain Button + </Component.Button> +</body> + +</html>
\ No newline at end of file |