diff options
author | 2022-11-01 16:20:04 +0000 | |
---|---|---|
committer | 2022-11-01 16:20:04 +0000 | |
commit | 4e2bd173932c231697a17a3098dc22ef3e481525 (patch) | |
tree | 0cf7877436a1463d78dad231ef28ebd8116225fc /examples/hackernews/src/components/Show.astro | |
parent | bb6e8800094dc59841eb3b345fcb8baca9e17ce9 (diff) | |
download | astro-4e2bd173932c231697a17a3098dc22ef3e481525.tar.gz astro-4e2bd173932c231697a17a3098dc22ef3e481525.tar.zst astro-4e2bd173932c231697a17a3098dc22ef3e481525.zip |
Adds a Hackernews example site (#5213)
* adds the hackernews example - TODO add readme content
* refactor: moving styles from root.css into components
* chore: add README content
* chore: lint fixes + prettier-plugin-astro@0.4.0
* Update examples/hackernews/README.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* lint: remove unused variable
* nit: adding check command to example
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Diffstat (limited to 'examples/hackernews/src/components/Show.astro')
-rw-r--r-- | examples/hackernews/src/components/Show.astro | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/hackernews/src/components/Show.astro b/examples/hackernews/src/components/Show.astro new file mode 100644 index 000000000..7e0887784 --- /dev/null +++ b/examples/hackernews/src/components/Show.astro @@ -0,0 +1,9 @@ +--- +export interface Props<T> { + when: T | number | boolean | undefined | null; +} + +const { when } = Astro.props; +--- + +{!!when ? <slot /> : <slot name="fallback" />} |