Files
Timetable-V2/src/components/info-card.vue
2023-06-20 00:36:59 +02:00

76 lines
1.1 KiB
Vue

<script setup>
defineProps({
title: {
type: String,
required: true,
},
text: {
type: String,
required: true,
},
icon: {
required: true,
},
});
</script>
<template>
<div class="info-card">
<div class="content">
<component :is="icon" class="icon" />
<span class="title">{{ title }}</span>
<span class="description">{{ text }}</span>
</div>
</div>
</template>
<style scoped>
.info-card {
box-sizing: border-box;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
margin-top: 50px;
width: max-content;
height: 50vh;
max-width: 100%;
z-index: 1;
user-select: none;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 3px;
max-width: 350px;
padding: 30px;
height: inherit;
}
.icon {
width: 100px;
height: 100px;
stroke-width: 1px;
padding-bottom: 15px;
}
span {
word-wrap: normal;
text-align: center;
}
span.title {
font-weight: bold;
font-size: 18px;
}
span.description {
font-weight: 300;
}
</style>