Add: Ago component
This commit is contained in:
parent
3462fd5e02
commit
0b92b8a716
18
src/comp/ago.svelte
Normal file
18
src/comp/ago.svelte
Normal file
@ -0,0 +1,18 @@
|
||||
<script>
|
||||
import moment from "moment";
|
||||
|
||||
/**
|
||||
* @type {moment.MomentInput}
|
||||
*/
|
||||
export let date;
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.date {
|
||||
color: var(--white-dim);
|
||||
font-size: 0.8em;
|
||||
}
|
||||
</style>
|
||||
|
||||
<span class="date">{moment(date).fromNow()}</span>
|
||||
Loading…
x
Reference in New Issue
Block a user