summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/groups/components/item_caret.vue
blob: e23b0fa7413d329d9b02dba2ab6ddc25abaae33b (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
<script>
import { GlIcon } from '@gitlab/ui';

export default {
  components: {
    GlIcon,
  },
  props: {
    isGroupOpen: {
      type: Boolean,
      required: true,
      default: false,
    },
  },
  computed: {
    iconClass() {
      return this.isGroupOpen ? 'angle-down' : 'angle-right';
    },
  },
};
</script>

<template>
  <span class="folder-caret gl-mr-2"> <gl-icon :size="10" :name="iconClass" /> </span>
</template>