feat: fixed color on stat card

This commit is contained in:
Methapon2001 2024-04-22 14:55:21 +07:00
parent f08f4f327f
commit f49dec676a

View file

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