Files
habitica/website/client/components/inventory/stable/mountItem.vue
T
Matteo Pagliazzi 9f11820a02 Client Fixes (#9120)
* unduplicate logout code

* re-enable debug menu

* fix pets badge and equipping mounts

* close gift modal after sending gems

* armoire notifications
2017-10-01 23:25:32 +02:00

58 lines
1.1 KiB
Vue

<template lang="pug">
div
.item-wrapper(@click="click()", :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(),
});
},
methods: {
click () {
this.$emit('click', {});
},
},
};
</script>