debian-mirror-gitlab/app/assets/javascripts/emoji/components/emoji_group.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1,000 B
Vue
Raw Normal View History

2021-04-17 20:07:23 +05:30
<script>
2023-05-27 22:25:52 +05:30
import { compatFunctionalMixin } from '~/lib/utils/vue3compat/compat_functional_mixin';
2021-04-17 20:07:23 +05:30
export default {
2023-05-27 22:25:52 +05:30
// Temporary mixin for migration from Vue.js 2 to @vue/compat
mixins: [compatFunctionalMixin],
2021-04-17 20:07:23 +05:30
props: {
emojis: {
type: Array,
required: true,
},
renderGroup: {
type: Boolean,
required: true,
},
clickEmoji: {
type: Function,
required: true,
},
},
};
</script>
2021-09-30 23:02:18 +05:30
<!-- eslint-disable-next-line vue/no-deprecated-functional-template -->
2021-04-17 20:07:23 +05:30
<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>