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

label.vue « wrappers « components « content_editor « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4206c8660327ea1ac634540eed3204ece416e5fe (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
<script>
import { NodeViewWrapper } from '@tiptap/vue-2';
import { GlLabel } from '@gitlab/ui';
import { isScopedLabel } from '~/lib/utils/common_utils';

export default {
  name: 'DetailsWrapper',
  components: {
    NodeViewWrapper,
    GlLabel,
  },
  props: {
    node: {
      type: Object,
      required: true,
    },
  },
  computed: {
    isScopedLabel() {
      return isScopedLabel({ title: this.node.attrs.originalText });
    },
  },
};
</script>
<template>
  <node-view-wrapper class="gl-display-inline-block">
    <gl-label
      size="sm"
      :scoped="isScopedLabel"
      :background-color="node.attrs.color"
      :title="node.attrs.text"
    />
  </node-view-wrapper>
</template>