Files
habitica/website/client/components/inventory/stable/mountItem.vue
T
Matteo Pagliazzi 666cc855c1 Client: fix popovers and tooltips (#9014)
* rebuild shrinkwrap

* upgrade tooltips and popovers
2017-09-01 15:15:54 +02:00

53 lines
1005 B
Vue

<template lang="pug">
div
.item-wrapper(:id="itemId")
.item(
:class="{'item-empty': emptyItem}",
)
slot(name="itemBadge", :item="item")
span.item-content(:class="itemContentClass")
b-popover(
:target="itemId",
v-if="showPopover",
triggers="hover",
:placement="popoverPosition",
)
slot(name="popoverContent", :item="item")
</template>
<script>
import bPopover from 'bootstrap-vue/lib/components/popover';
import uuid from 'uuid';
export default {
components: {
bPopover,
},
props: {
item: {
type: Object,
},
itemContentClass: {
type: String,
},
emptyItem: {
type: Boolean,
default: false,
},
popoverPosition: {
type: String,
default: 'bottom',
},
showPopover: {
type: Boolean,
default: true,
},
},
data () {
return Object.freeze({
itemId: uuid.v4(),
});
},
};
</script>