2026-01-24 17:45:54 +03:30
|
|
|
<template>
|
2026-05-31 11:51:52 +03:30
|
|
|
<div class="w-full min-w-0 rounded-lg border border-gray-100 bg-gray-50/60 px-3 py-2 lg:border-0 lg:bg-transparent lg:px-0 lg:py-0">
|
|
|
|
|
<div class="flex w-full min-w-0 items-center justify-between gap-2 lg:block">
|
|
|
|
|
<div class="flex min-w-0 items-center gap-2">
|
|
|
|
|
<div class="aspect-square h-8 shrink-0 rounded-full p-1" :class="bgColor">
|
2026-01-24 17:45:54 +03:30
|
|
|
<BaseIcon icon="vuesax-linear:profile-add" :class="textColor" />
|
|
|
|
|
</div>
|
2026-05-31 11:51:52 +03:30
|
|
|
<div class="truncate text-xs font-bold">{{ title }}</div>
|
2026-01-24 17:45:54 +03:30
|
|
|
</div>
|
2026-05-31 11:51:52 +03:30
|
|
|
<div class="flex shrink-0 flex-row-reverse items-baseline gap-1 pl-1 lg:mt-5 lg:w-full lg:pl-2">
|
2026-01-24 17:45:54 +03:30
|
|
|
<div class="text-xs">{{ unit }}</div>
|
2026-05-31 11:51:52 +03:30
|
|
|
<div class="font-bold text-lg lg:text-xl">{{ count ?? 0 }}</div>
|
2026-01-24 17:45:54 +03:30
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
interface Prop {
|
|
|
|
|
color: string
|
|
|
|
|
title: string
|
|
|
|
|
count?: number
|
|
|
|
|
unit: 'نفر' | 'گرم'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const props = defineProps<Prop>()
|
|
|
|
|
|
|
|
|
|
const bgColor = computed(() => {
|
|
|
|
|
switch (props.color) {
|
|
|
|
|
case 'fuchsia':
|
|
|
|
|
return 'bg-fuchsia-100'
|
|
|
|
|
case 'orange':
|
|
|
|
|
return 'bg-orange-100'
|
|
|
|
|
case 'green':
|
|
|
|
|
return 'bg-green-100'
|
|
|
|
|
case 'blue':
|
|
|
|
|
return 'bg-blue-100'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const textColor = computed(() => {
|
|
|
|
|
switch (props.color) {
|
|
|
|
|
case 'fuchsia':
|
|
|
|
|
return 'text-fuchsia-600'
|
|
|
|
|
case 'orange':
|
|
|
|
|
return 'text-orange-600'
|
|
|
|
|
case 'green':
|
|
|
|
|
return 'text-green-600'
|
|
|
|
|
case 'blue':
|
|
|
|
|
return 'text-blue-600'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="less"></style>
|