unify user popovers into a separate component
This commit is contained in:
parent
770d12f7ad
commit
d84cda7009
9 changed files with 127 additions and 130 deletions
34
src/components/user_popover/user_popover.vue
Normal file
34
src/components/user_popover/user_popover.vue
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<template>
|
||||
<Popover
|
||||
trigger="click"
|
||||
popover-class="popover-default user-popover"
|
||||
overlay-centers-selector=".user-info-avatar-link .Avatar"
|
||||
:overlay-centers="overlayCenters"
|
||||
:disabled="disabled"
|
||||
>
|
||||
<template v-slot:trigger>
|
||||
<slot />
|
||||
</template>
|
||||
<template v-slot:content>
|
||||
<UserCard
|
||||
class="user-popover"
|
||||
:user-id="userId"
|
||||
:hide-bio="true"
|
||||
:bordered="false"
|
||||
:allow-zooming-avatar="true"
|
||||
:rounded="true"
|
||||
/>
|
||||
</template>
|
||||
</Popover>
|
||||
</template>
|
||||
|
||||
<script src="./user_popover.js" ></script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '../../_variables.scss';
|
||||
|
||||
/* popover styles load on-demand, so we need to override */
|
||||
.user-popover.popover {
|
||||
}
|
||||
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue