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

widget_content_section.vue « widget « components « vue_merge_request_widget « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 61e3744b5dc1a0e78639b0701a875d9f9f7c0fac (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
<script>
import { EXTENSION_ICONS } from '../../constants';
import StatusIcon from '../extensions/status_icon.vue';

export default {
  components: {
    StatusIcon,
  },
  props: {
    statusIconName: {
      type: String,
      default: '',
      required: false,
      validator: (value) => value === '' || Object.keys(EXTENSION_ICONS).includes(value),
    },
    widgetName: {
      type: String,
      required: true,
    },
  },
};
</script>
<template>
  <div class="gl-px-7">
    <div class="gl-pl-4 gl-display-flex">
      <status-icon
        v-if="statusIconName"
        :level="2"
        :name="widgetName"
        :icon-name="statusIconName"
      />
      <slot name="default"></slot>
    </div>
  </div>
</template>