gitlab-org--gitlab-foss/app/assets/javascripts/groups/components/item_type_icon.vue

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

31 lines
525 B
Vue
Raw Normal View History

<script>
import { GlIcon } from '@gitlab/ui';
import { ITEM_TYPE } from '../constants';
export default {
2017-12-22 07:00:07 +00:00
components: {
GlIcon,
2017-12-22 07:00:07 +00:00
},
props: {
itemType: {
type: String,
required: true,
},
},
computed: {
iconClass() {
if (this.itemType === ITEM_TYPE.GROUP) {
return 'subgroup';
}
return 'project';
},
},
};
</script>
<template>
<span class="item-type-icon gl-display-inline-block gl-text-secondary">
<gl-icon :name="iconClass" />
</span>
</template>