ErrorHeader.vue
844 Bytes
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
<script setup>
const props = defineProps({
statusCode: {
type: [
String,
Number,
],
required: false,
},
title: {
type: String,
required: false,
},
description: {
type: String,
required: false,
},
})
</script>
<template>
<div class="text-center mb-4">
<!-- 👉 Title and subtitle -->
<h1
v-if="props.statusCode"
class="error-title mb-2"
>
{{ props.statusCode }}
</h1>
<h4
v-if="props.title"
class="text-h4 mb-2"
>
{{ props.title }}
</h4>
<p
v-if="props.description"
class="mb-0 text-body-1"
>
{{ props.description }}
</p>
</div>
</template>
<style lang="scss" scoped>
.error-title {
font-size: clamp(3rem, 5vw, 6rem);
font-weight: 500;
line-height: clamp(3rem, 5vw, 6rem);
}
</style>