0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-29 16:36:44 +01:00
svelte/documentation/examples/21-miscellaneous/01-hacker-news/Comment.svelte

33 lines
446 B
Svelte
Raw Normal View History

2019-04-15 15:10:17 +02:00
<script>
export let comment;
</script>
<article>
<p class="meta">{comment.user} {comment.time_ago}</p>
{@html comment.content}
<div class="replies">
{#each comment.comments as child}
2023-05-14 07:50:43 +02:00
<svelte:self comment={child} />
{/each}
</div>
</article>
<style>
article {
border-top: 1px solid #eee;
margin: 1em 0 0 0;
padding: 1em 0 0 0;
font-size: 14px;
}
.meta {
color: #999;
}
.replies {
padding: 0 0 0 1em;
}
2023-05-14 07:50:43 +02:00
</style>