Welcome to mirror list, hosted at ThFree Co, Russian Federation.

emoji_group.vue « components « emoji « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bbac6866636d9b51e298b6d22ac49fe27d7eb72d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<script>
import { compatFunctionalMixin } from '~/lib/utils/vue3compat/compat_functional_mixin';

export default {
  // Temporary mixin for migration from Vue.js 2 to @vue/compat
  mixins: [compatFunctionalMixin],

  props: {
    emojis: {
      type: Array,
      required: true,
    },
    renderGroup: {
      type: Boolean,
      required: true,
    },
    clickEmoji: {
      type: Function,
      required: true,
    },
  },
};
</script>

<!-- eslint-disable-next-line vue/no-deprecated-functional-template -->
<template functional>
  <div class="gl-display-flex gl-flex-wrap gl-mb-2">
    <template v-if="props.renderGroup">
      <button
        v-for="emoji in props.emojis"
        :key="emoji"
        type="button"
        class="gl-border-0 gl-bg-transparent gl-px-0 gl-py-2 gl-text-center emoji-picker-emoji"
        data-testid="emoji-button"
        @click="props.clickEmoji(emoji)"
      >
        <gl-emoji :data-name="emoji" />
      </button>
    </template>
  </div>
</template>