This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
export let date: string | Date;
|
||||
export let readDuration: string | undefined;
|
||||
|
||||
const toDate = (d: string | Date) =>
|
||||
typeof d === "string" ? new Date(d) : d;
|
||||
@@ -22,4 +23,8 @@
|
||||
<time class="text-sm text-neutral" datetime={iso(date)}
|
||||
>{formatDate(date)}</time>
|
||||
{/if}
|
||||
|
||||
{#if readDuration}
|
||||
<div class="text-sm text-neutral">{readDuration} mins read</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user