mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
* Issue 10786 - Add unit test for Home component * Issue 10786 - Improve test setup and test invite parameter variations * Issue 10786 - Improve Vue.js test isolation by adding async keyword to dispatch function * Issue 10786 - Missing action does not need to be awaited * Use localVue for groupsUtilities test and revert partial zone fix
60 lines
910 B
Vue
60 lines
910 B
Vue
<template>
|
|
<div
|
|
class="badge badge-round badge-pin align-items-center justify-content-center"
|
|
:class="{'pinned': pinned}"
|
|
>
|
|
<div
|
|
class="svg-icon color"
|
|
v-html="icons.pin"
|
|
>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<style lang="scss" scoped>
|
|
@import '~@/assets/scss/colors.scss';
|
|
|
|
.badge-pin {
|
|
background-color: $white;
|
|
color: $gray-200;
|
|
transition: none;
|
|
display: flex;
|
|
cursor: pointer;
|
|
padding: 0.25rem;
|
|
|
|
&:hover:not(.pinned) {
|
|
color: $purple-300;
|
|
}
|
|
|
|
&.pinned {
|
|
background-color: $purple-300;
|
|
color: $white;
|
|
}
|
|
|
|
.svg-icon {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
import svgPin from '@/assets/svg/pin.svg';
|
|
|
|
export default {
|
|
props: {
|
|
pinned: {
|
|
type: Boolean,
|
|
},
|
|
},
|
|
data () {
|
|
return {
|
|
icons: Object.freeze({
|
|
pin: svgPin,
|
|
}),
|
|
};
|
|
},
|
|
};
|
|
</script>
|