summaryrefslogtreecommitdiff
path: root/src/components/_sila/Global/Collapse.vue
blob: ac7eb467381f724ac76ecae0f159b18411b3257f (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<template>
  <div>
    <b-button
      v-b-toggle="id"
      variant="collapse"
      class="d-flex flex-nowrap justify-content-start"
    >
      <slot name="image"></slot>
      {{ title }}
      <component :is="iconChevronUp" class="icon-expand" />
    </b-button>
    <b-collapse :id="id" class="nav-item__nav">
      <slot
        style="margin-top 2rem; margin-left: 2rem; margin-right: 2 rem;"
      ></slot>
    </b-collapse>
  </div>
</template>
<script>
import iconChevronUp from '@carbon/icons-vue/es/chevron--up/20';

export default {
  name: 'Collapse',
  props: {
    id: {
      type: String,
      default: null,
    },
    title: {
      type: String,
      default: null,
    },
  },
  data() {
    return {
      iconChevronUp: iconChevronUp,
    };
  },
};
</script>