2017-10-04 14:10:24 +00:00
|
|
|
<script>
|
2020-08-24 15:10:11 +00:00
|
|
|
import { GlIcon } from '@gitlab/ui';
|
2017-10-04 14:10:24 +00:00
|
|
|
import { ITEM_TYPE } from '../constants';
|
|
|
|
|
|
|
|
export default {
|
2017-12-22 07:00:07 +00:00
|
|
|
components: {
|
2020-08-24 15:10:11 +00:00
|
|
|
GlIcon,
|
2017-12-22 07:00:07 +00:00
|
|
|
},
|
2017-10-04 14:10:24 +00:00
|
|
|
props: {
|
|
|
|
itemType: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
iconClass() {
|
|
|
|
if (this.itemType === ITEM_TYPE.GROUP) {
|
2022-04-14 21:09:21 +00:00
|
|
|
return 'subgroup';
|
2017-10-04 14:10:24 +00:00
|
|
|
}
|
2022-04-06 15:08:23 +00:00
|
|
|
return 'project';
|
2017-10-04 14:10:24 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-06-15 06:08:36 +00:00
|
|
|
<span class="item-type-icon gl-display-inline-block gl-text-secondary">
|
|
|
|
<gl-icon :name="iconClass" />
|
|
|
|
</span>
|
2017-10-04 14:10:24 +00:00
|
|
|
</template>
|