feat: add color to stat card

This commit is contained in:
Methapon2001 2024-04-23 14:43:00 +07:00
parent 372b13a82d
commit f5a1e058c4
2 changed files with 22 additions and 21 deletions

View file

@ -6,13 +6,13 @@ const props = withDefaults(
branch: {
count: number;
label: string;
color?: 'pink' | 'purple' | 'green';
color: 'pink' | 'purple' | 'green';
}[];
dark?: boolean;
isBranch?: boolean;
labelI18n?: boolean;
}>(),
{
isBranch: false,
labelI18n: false,
},
);
</script>
@ -40,7 +40,7 @@ const props = withDefaults(
<div class="stat-card__content">
<div class="text-h5 text-weight-bold">{{ v.count }}</div>
<div class="text-weight-bold">
{{ isBranch ? $t(v.label) : v.label }}
{{ labelI18n ? $t(v.label) : v.label }}
</div>
</div>
</AppBox>