mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
* made style change for pet item class to have more margins.
* made style change for pet item class to have more margins.
* files got added
* encapsulated the items as stated in #9903
* #9903 moved the css to stable -> petitem.vue for better encapsulation.
* saving pngs
* update on files
* updated files as requested in PR!
* Revert "saving pngs"
This reverts commit a38ea664e1.
* made css changes just to pet slot
* #9982 removed redundant css
* #9982 applied scss to mount slots as well.
* #9982 refactored scss to be in one place.
* #9982 changed selector
54 lines
1009 B
Vue
54 lines
1009 B
Vue
<template lang="pug">
|
|
div
|
|
.item-wrapper(@click="click()", :id="itemId")
|
|
.item.pet-slot(
|
|
: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 uuid from 'uuid';
|
|
|
|
export default {
|
|
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>
|