Skip to content

Commit

Permalink
fixup! fix(SelectableParticipant): restyle component
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Aug 20, 2024
1 parent fbd462b commit ce96b16
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions src/components/BreakoutRoomsEditor/SelectableParticipant.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
-->

<template>
<label :for="participant.attendeeId"
class="selectable-participant"
<label class="selectable-participant"
:class="{ 'selectable-participant--selected': selected }">
<input :id="participant.attendeeId"
v-model="modelProxy"
<input v-model="modelProxy"
:value="participant.attendeeId"
type="checkbox"
class="hidden-visually">
class="selectable-participant__checkbox">
<!-- Participant's avatar -->
<AvatarWrapper :id="participant.actorId"
:name="participant.displayName"
Expand All @@ -30,7 +28,7 @@
</span>
</span>

<IconCheck v-if="selected" class="selectable-participant__check-icon" :size="20" />
<IconCheck class="selectable-participant__check-icon" :size="20" />
</label>
</template>

Expand Down Expand Up @@ -73,10 +71,6 @@ export default {
this.$emit('update:checked', value)
},
},
selected() {
return this.checked.includes(this.participant.attendeeId)
},
},
}
</script>
Expand Down Expand Up @@ -104,7 +98,7 @@ export default {
box-shadow: 0 0 0 4px var(--color-main-background);
}
&--selected {
&:has(input:checked) {
background-color: var(--color-primary-light);
&:hover,
Expand All @@ -115,6 +109,17 @@ export default {
}
}
&:has(input:checked) &__check-icon {
display: flex;
}
&__checkbox {
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
&__content {
display: flex;
flex-direction: column;
Expand All @@ -130,6 +135,7 @@ export default {
}
&__check-icon {
display: none;
margin-left: auto;
width: var(--default-clickable-area);
}
Expand Down

0 comments on commit ce96b16

Please sign in to comment.