29 lines
477 B
Vue
29 lines
477 B
Vue
<script>
|
|
import { GlIcon } from '@gitlab/ui';
|
|
import { ITEM_TYPE } from '../constants';
|
|
|
|
export default {
|
|
components: {
|
|
GlIcon,
|
|
},
|
|
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-icon :name="iconClass" /> </span>
|
|
</template>
|