Skip to content

Commit c812e2a

Browse files
author
hywax
committed
chore: placeholder animate props
1 parent d4edb9a commit c812e2a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

components/service/Placeholder.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
<template>
22
<div class="p-4 flex gap-4">
33
<div class="flex-shrink-0 flex">
4-
<div class="self-center w-16 h-16 overflow-hidden rounded-2xl border border-black/5 animate-pulse">
4+
<div class="self-center w-16 h-16 overflow-hidden rounded-2xl border border-black/5" :class="{ 'animate-pulse': props.animate }">
55
<div class="bg-fg/5 dark:bg-fg/10 h-full w-full" />
66
</div>
77
</div>
88
<div>
9-
<h3 class="animate-pulse text-lg mt-1">
9+
<h3 class="text-lg mt-1" :class="{ 'animate-pulse': props.animate }">
1010
<span class="inline-block min-h-[1em] w-[110px] flex-auto cursor-wait bg-fg/5 dark:bg-fg/10 align-middle opacity-50 rounded" />
1111
</h3>
12-
<p class="animate-pulse text-sm text-black/50">
12+
<p class="text-sm text-black/50" :class="{ 'animate-pulse': props.animate }">
1313
<span class="inline-block min-h-[1em] w-[160px] flex-auto cursor-wait bg-fg/5 dark:bg-fg/10 align-middle opacity-50 rounded" />
1414
</p>
1515
</div>
1616
</div>
1717
</template>
18+
19+
<script setup lang="ts">
20+
const props = withDefaults(defineProps<{ animate?: boolean }>(), {
21+
animate: true,
22+
})
23+
</script>

0 commit comments

Comments
 (0)