mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
56 lines
998 B
Vue
56 lines
998 B
Vue
<template>
|
|
<div class="emotion-button">
|
|
<base-button :id="emotion" circle ghost @click="$emit('toggleEmotion', emotion)">
|
|
<img :src="emojiPath" />
|
|
</base-button>
|
|
<label class="label" :for="emotion">{{ $t(`contribution.emotions-label.${emotion}`) }}</label>
|
|
<p v-if="count !== null" class="count">{{ emotionCount }}x</p>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
emojiPath: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
emotion: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
emotionCount: {
|
|
type: Number,
|
|
default: null,
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.emotion-button {
|
|
flex-grow: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
|
|
> .base-button {
|
|
padding: 0;
|
|
|
|
&:hover {
|
|
padding: $space-xxx-small;
|
|
}
|
|
}
|
|
|
|
> .label {
|
|
margin-top: $space-xx-small;
|
|
font-size: $font-size-small;
|
|
cursor: pointer;
|
|
}
|
|
|
|
> .count {
|
|
margin: $space-xx-small 0;
|
|
}
|
|
}
|
|
</style>
|