You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/documentation/examples/21-miscellaneous/01-hacker-news/Comment.svelte

33 lines
446 B

<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}
<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;
}
</style>