2020-01-29 20:37:25 +01:00
|
|
|
<template>
|
2023-05-29 15:11:42 +02:00
|
|
|
<div class="info" :class="{ warn, card }">
|
2023-04-08 02:01:42 +02:00
|
|
|
<i v-if="warn" class="ph-warning ph-bold ph-lg"></i>
|
2023-05-29 15:11:42 +02:00
|
|
|
<i v-else class="ph-bold ph-lg" :class="icon ? `ph-${icon}` : 'ph-info'"></i>
|
2023-04-08 02:01:42 +02:00
|
|
|
<slot></slot>
|
|
|
|
</div>
|
2020-01-29 20:37:25 +01:00
|
|
|
</template>
|
|
|
|
|
2022-09-06 11:09:17 +02:00
|
|
|
<script lang="ts" setup>
|
2023-04-08 02:01:42 +02:00
|
|
|
import {} from "vue";
|
2020-01-29 20:37:25 +01:00
|
|
|
|
2022-12-07 05:12:44 +01:00
|
|
|
defineProps<{
|
2023-05-29 15:11:42 +02:00
|
|
|
icon?: string;
|
2022-09-06 11:09:17 +02:00
|
|
|
warn?: boolean;
|
2023-05-29 15:11:42 +02:00
|
|
|
card?: boolean;
|
2022-09-06 11:09:17 +02:00
|
|
|
}>();
|
2020-01-29 20:37:25 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2023-05-29 15:11:42 +02:00
|
|
|
.info {
|
2020-01-29 20:37:25 +01:00
|
|
|
padding: 16px;
|
|
|
|
font-size: 90%;
|
|
|
|
background: var(--infoBg);
|
|
|
|
color: var(--infoFg);
|
2021-01-11 12:38:34 +01:00
|
|
|
border-radius: var(--radius);
|
2020-01-29 20:37:25 +01:00
|
|
|
|
|
|
|
&.warn {
|
|
|
|
background: var(--infoWarnBg);
|
|
|
|
color: var(--infoWarnFg);
|
|
|
|
}
|
|
|
|
|
2023-05-29 15:11:42 +02:00
|
|
|
&.card {
|
|
|
|
background: var(--panel);
|
|
|
|
color: var(--fg);
|
|
|
|
padding: 48px;
|
|
|
|
font-size: 1em;
|
|
|
|
text-align: center;
|
|
|
|
> i {
|
|
|
|
display: block;
|
|
|
|
font-size: 4em;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
> :deep(*) {
|
|
|
|
margin-inline: auto;
|
|
|
|
}
|
|
|
|
> :deep(:not(:last-child)) {
|
|
|
|
margin-bottom: 20px;
|
|
|
|
}
|
|
|
|
> :deep(p) {
|
|
|
|
max-width: 30em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-29 20:37:25 +01:00
|
|
|
> i {
|
|
|
|
margin-right: 4px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|