File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 44 <span class =" absolute -top-6 right-0 text-sm text-lightProgressBarText dark:text-darkProgressBarText" >{{ rightLabel }}</span >
55 <div
66 class =" bg-lightProgressBarFilledColor dark:bg-darkProgressBarFilledColor h-2.5 rounded-full transition-all duration-300 ease-in-out"
7+ :class =" { 'progress-bar': showAnimation }"
78 :style =" { width: `${percentage}%` }"
89 ></div >
910 <span v-if =" showValues" class =" absolute top-4 left-0 text-sm text-lightProgressBarText dark:text-darkProgressBarText" >{{ formatValue(minValue) }}</span >
@@ -26,6 +27,7 @@ interface Props {
2627 showLabels? : boolean
2728 showValues? : boolean
2829 showProgress? : boolean
30+ showAnimation? : boolean
2931}
3032
3133const props = withDefaults (defineProps <Props >(), {
@@ -53,3 +55,34 @@ const formatValue = (value: number): string => {
5355 return formatter (value )
5456}
5557 </script >
58+
59+
60+ <style scoped>
61+ .progress-bar {
62+ position : relative ;
63+ overflow : hidden ;
64+ }
65+
66+ .progress-bar ::after {
67+ content : " " ;
68+ position : absolute ;
69+ inset : 0 ;
70+ width : 100% ;
71+
72+ background : linear-gradient (
73+ -45deg ,
74+ transparent 35% ,
75+ rgba (255 ,255 ,255 ,0.4 ),
76+ transparent 65%
77+ );
78+
79+ transform : translateX (-100% );
80+ animation : progress-slide 2s linear infinite ;
81+ }
82+
83+ @keyframes progress-slide {
84+ 100% {
85+ transform : translateX (100% );
86+ }
87+ }
88+ </style >
You can’t perform that action at this time.
0 commit comments