File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
packages/common-ui/src/components Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 88 v-for =" card in cards"
99 :key =" card._id"
1010 @click =" selectCard(card)"
11+ :class =" {'selected-card': card._id === selectedCardId}"
1112 class =" cursor-pointer"
1213 >
1314 <v-list-item-title >{{ card._id }}</v-list-item-title >
@@ -51,6 +52,7 @@ export default defineComponent({
5152 cards: [] as CardWithCourse [],
5253 loading: false ,
5354 error: null as string | null ,
55+ selectedCardId: null as string | null ,
5456 };
5557 },
5658 watch: {
@@ -107,8 +109,20 @@ export default defineComponent({
107109 },
108110
109111 selectCard(card : CardWithCourse ) {
112+ this .selectedCardId = card ._id ;
110113 this .$emit (' card-selected' , { cardId: card ._id , courseId: card .courseId });
111114 },
112115 },
113116});
114117 </script >
118+
119+ <style scoped>
120+ .selected-card {
121+ background-color : #e0f2f7 ; /* Light blue background */
122+ border-left : 4px solid #2196f3 ; /* Blue left border */
123+ }
124+
125+ .cursor-pointer {
126+ cursor : pointer ;
127+ }
128+ </style >
You can’t perform that action at this time.
0 commit comments