diff options
| author | lain <lain@soykaf.club> | 2020-01-28 15:24:56 +0000 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-01-28 15:24:56 +0000 |
| commit | 73253b87bfce0466848231da47e1864c6ff639b0 (patch) | |
| tree | 732aff3bd3007c26c67e3de00a27379751b3a8a3 /src/components/emoji_reactions/emoji_reactions.vue | |
| parent | 4a11ee9768f2abbaa9da0e2454e2793734cce040 (diff) | |
| parent | 6afff4f8c205ec70d3694564c706f6a46a61db9e (diff) | |
Merge branch 'feat/emoji-reactions' into 'develop'
Emoji reactions
See merge request pleroma/pleroma-fe!1049
Diffstat (limited to 'src/components/emoji_reactions/emoji_reactions.vue')
| -rw-r--r-- | src/components/emoji_reactions/emoji_reactions.vue | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/components/emoji_reactions/emoji_reactions.vue b/src/components/emoji_reactions/emoji_reactions.vue new file mode 100644 index 00000000..741fc11e --- /dev/null +++ b/src/components/emoji_reactions/emoji_reactions.vue @@ -0,0 +1,51 @@ +<template> + <div class="emoji-reactions"> + <button + v-for="(reaction) in emojiReactions" + :key="reaction.emoji" + class="emoji-reaction btn btn-default" + :class="{ 'picked-reaction': reactedWith(reaction.emoji) }" + @click="emojiOnClick(reaction.emoji, $event)" + > + <span>{{ reaction.emoji }}</span> + <span>{{ reaction.count }}</span> + </button> + </div> +</template> + +<script src="./emoji_reactions.js" ></script> +<style lang="scss"> +@import '../../_variables.scss'; + +.emoji-reactions { + display: flex; + margin-top: 0.25em; + flex-wrap: wrap; +} + +.emoji-reaction { + padding: 0 0.5em; + margin-right: 0.5em; + margin-top: 0.5em; + display: flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + &:first-child { + margin-right: 0.25em; + } + &:last-child { + width: 1.5em; + } + &:focus { + outline: none; + } +} + +.picked-reaction { + border: 1px solid var(--link, $fallback--link); + margin-left: -1px; // offset the border, can't use inset shadows either + margin-right: calc(0.5em - 1px); +} + +</style> |
