summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/packages_and_registries/package_registry/components/list/tokens/package_type_token.vue
blob: 529a7893dfcfd594aa9d07b01a6dc5876bb43a1c (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
<script>
import { GlFilteredSearchToken, GlFilteredSearchSuggestion } from '@gitlab/ui';
import { PACKAGE_TYPES } from '~/packages/list/constants';

export default {
  components: {
    GlFilteredSearchToken,
    GlFilteredSearchSuggestion,
  },
  PACKAGE_TYPES,
};
</script>

<template>
  <gl-filtered-search-token v-bind="{ ...$attrs }" v-on="$listeners">
    <template #suggestions>
      <gl-filtered-search-suggestion
        v-for="(type, index) in $options.PACKAGE_TYPES"
        :key="index"
        :value="type.type"
      >
        {{ type.title }}
      </gl-filtered-search-suggestion>
    </template>
  </gl-filtered-search-token>
</template>