-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTwo.vue
25 lines (21 loc) · 1.03 KB
/
Two.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<template>
<div class="grid grid-cols-2 lg:flex bg-white border border-gray-200 rounded-2xl">
<div class="flex flex-col gap-2 flex-1 text-center p-4" v-for="stat in stats">
<h3 class="text-sm md:text-md text-gray-400 font-light">{{ stat.label }}</h3>
<h1 class="text-2xl md:text-3xl font-medium">{{ stat.value }}</h1>
<div class="flex justify-center items-center gap-1">
<h4 class="text-md">{{ stat.change.value }}%</h4>
<i class="ri-arrow-up-line" v-if="stat.change.up"></i>
<i class="ri-arrow-down-line" v-else></i>
</div>
</div>
</div>
</template>
<script setup>
const stats = [
{ label: 'Followers', value: '6,543', change: { up: true, value: '+12' } },
{ label: 'Likes', value: '24,645', change: { up: false, value: '-8' } },
{ label: 'Comments', value: '957', change: { up: true, value: '+12' } },
{ label: 'Shares', value: '68,165', change: { up: false, value: '-28' } }
]
</script>