1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-24 03:28:27 +09:00
MisskeyIO/packages/frontend/src/components/MkInfo.vue

35 lines
608 B
Vue
Raw Normal View History

<template>
2023-01-15 08:32:20 +09:00
<div :class="[$style.root, { [$style.warn]: warn }]">
<i v-if="warn" class="ti ti-alert-triangle" :class="$style.i"></i>
<i v-else class="ti ti-info-circle" :class="$style.i"></i>
<slot></slot>
</div>
</template>
2022-09-06 18:09:17 +09:00
<script lang="ts" setup>
import { } from 'vue';
2022-09-06 18:09:17 +09:00
const props = defineProps<{
warn?: boolean;
}>();
</script>
2023-01-15 08:32:20 +09:00
<style lang="scss" module>
.root {
2022-12-20 13:12:32 +09:00
padding: 12px 14px;
font-size: 90%;
background: var(--infoBg);
color: var(--infoFg);
border-radius: var(--radius);
&.warn {
background: var(--infoWarnBg);
color: var(--infoWarnFg);
}
2023-01-15 08:32:20 +09:00
}
2023-01-15 08:32:20 +09:00
.i {
margin-right: 4px;
}
</style>