summaryrefslogtreecommitdiff
path: root/src/components/_sila/Global/PageTitle.vue
blob: 3f8ffe66a5b630290bf86b725a7d2259c25dd442 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<template>
  <div v-if="description" class="page-title">
    <h1 class="bold-24px text-title">{{ title }}</h1>
    <p class="page-description">{{ description }}</p>
  </div>
  <div v-else class="page-title no_description">
    <h1 class="bold-24px text-title">{{ title }}</h1>
    <p class="page-description">{{ description }}</p>
  </div>
</template>

<script>
export default {
  name: 'PageTitle',
  props: {
    description: {
      type: String,
      default: '',
    },
  },
  data() {
    return {
      title: this.$route.meta.title,
    };
  },
};
</script>

<style lang="scss" scoped>
.page-title {
  width: 100%;
  height: 72px;
  border-bottom: 1px solid $faint-secondary-primary-10;
  background-color: $white;
  z-index: 1001;

  display: flex;
  flex-flow: column nowrap;
  align-items: flex-start;
  justify-content: center;
  &.no_description {
    height: 64px;
  }
}

.text-title {
  margin-left: 2rem;
}

.page-description {
  color: $text-secondary;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;

  margin: 4px 0 0 2rem;
  padding: 0;
}
</style>