mirror of https://github.com/sveltejs/svelte
33 lines
446 B
33 lines
446 B
6 years ago
|
<script>
|
||
|
export let comment;
|
||
|
</script>
|
||
|
|
||
4 years ago
|
<article>
|
||
|
<p class="meta">{comment.user} {comment.time_ago}</p>
|
||
|
|
||
|
{@html comment.content}
|
||
|
|
||
|
<div class="replies">
|
||
|
{#each comment.comments as child}
|
||
2 years ago
|
<svelte:self comment={child} />
|
||
4 years ago
|
{/each}
|
||
|
</div>
|
||
|
</article>
|
||
|
|
||
6 years ago
|
<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;
|
||
|
}
|
||
2 years ago
|
</style>
|