File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
frontend/src/components/emergencyaccess Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ <template >
2+ <svg
3+ :width =" width"
4+ :height =" height"
5+ :viewBox =" `0 0 ${viewBox} ${viewBox}`"
6+ :class =" attrs.class"
7+ aria-hidden =" true"
8+ >
9+ <g >
10+ <path
11+ v-for =" i in total"
12+ :key =" i"
13+ :d =" describeSegment(i - 1 + startIndex, total, radius)"
14+ :fill =" i <= completed ? fillColor : emptyColor"
15+ :stroke =" stroke"
16+ :stroke-width =" strokeWidth"
17+ />
18+ </g >
19+ </svg >
20+ </template >
21+
22+ <script setup lang="ts">
23+ import { useAttrs , withDefaults , defineProps } from ' vue' ;
24+ import { describeSegment } from ' ../../common/svgUtils' ;
25+
26+ const attrs = useAttrs ();
27+
28+ type Props = {
29+ total: number ;
30+ completed: number ;
31+ startIndex? : number ;
32+ width? : number ;
33+ height? : number ;
34+ viewBox? : number ;
35+ radius? : number ;
36+ fillColor? : string ;
37+ emptyColor? : string ;
38+ stroke? : string ;
39+ strokeWidth? : number ;
40+ };
41+
42+ withDefaults (defineProps <Props >(), {
43+ startIndex: 0 ,
44+ width: 20 ,
45+ height: 20 ,
46+ viewBox: 36 ,
47+ radius: 16 ,
48+ fillColor: ' #22c55e' ,
49+ emptyColor: ' #e5e7eb' ,
50+ stroke: ' white' ,
51+ strokeWidth: 1 ,
52+ });
53+ </script >
You can’t perform that action at this time.
0 commit comments