add stay-on-click prop to solve case of clicking user avatar in status popover

This commit is contained in:
Henry Jameson 2022-07-31 00:05:26 +03:00
commit d5bc825616
3 changed files with 36 additions and 4 deletions

View file

@ -21,12 +21,22 @@
:class="popoverClass || 'popover-default'"
@mouseenter="onMouseenterContent"
@mouseleave="onMouseleaveContent"
@click="onClickContent"
>
<slot
name="content"
class="popover-inner"
:close="hidePopover"
/>
<div
v-if="stayOnClick && pinned"
class="pinned-tooltip-icon popover popover-default"
>
<FAIcon
icon="thumbtack"
class="faint"
/>
</div>
</div>
</transition>
</teleport>
@ -51,6 +61,17 @@
box-shadow: var(--popupShadow);
}
.pinned-tooltip-icon {
position: absolute;
top: -1em;
left: -1em;
width: 2em;
height: 2em;
display: flex;
justify-content: center;
align-items: center;
}
.popover-default {
&:after {
content: '';