refactor: statcard color & sort

This commit is contained in:
puriphatt 2024-04-22 17:52:37 +07:00
parent e854d9267f
commit 642552dc5a
2 changed files with 9 additions and 4 deletions

View file

@ -6,9 +6,9 @@ const props = withDefaults(
branch: {
count: number;
label: string;
color?: 'pink' | 'purple';
}[];
dark?: boolean;
color?: 'pink' | 'purple';
isBranch?: boolean;
}>(),
{
@ -29,7 +29,7 @@ const colorRotate = ['pink', 'purple'];
v-for="(v, i) in props.branch"
:key="v.label"
class="bordered wave col-12"
:class="{ [`stat__${color || colorRotate[i % 2]}`]: true }"
:class="{ [`stat__${v.color || colorRotate[i % 2]}`]: true }"
style="width: 200px; min-width: 150px; box-shadow: var(--shadow-2)"
>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">