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

header_search_scoped_items.vue « components « header_search « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 645eba05148e14f4b134e49a3e3f69b1e109ab6c (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
<script>
import { GlDropdownItem } from '@gitlab/ui';
import { mapState, mapGetters } from 'vuex';

export default {
  name: 'HeaderSearchScopedItems',
  components: {
    GlDropdownItem,
  },
  computed: {
    ...mapState(['search']),
    ...mapGetters(['scopedSearchOptions']),
  },
};
</script>

<template>
  <div>
    <gl-dropdown-item
      v-for="(option, index) in scopedSearchOptions"
      :id="`scoped-${index}`"
      :key="index"
      tabindex="-1"
      :href="option.url"
    >
      "<span class="gl-font-weight-bold">{{ search }}</span
      >" {{ option.description }}
      <span v-if="option.scope" class="gl-font-style-italic">{{ option.scope }}</span>
    </gl-dropdown-item>
  </div>
</template>