2020-04-12 14:25:42 +00:00
|
|
|
<template>
|
2020-05-01 17:24:22 +00:00
|
|
|
<transition name="fade">
|
|
|
|
<div :class="['notification' ,'is-light', `is-${notification.level || 'info'}`]" v-if="ready">
|
|
|
|
<button class="delete" @click="close()"></button>
|
|
|
|
{{notification.message}}
|
|
|
|
</div>
|
|
|
|
</transition>
|
2020-04-12 14:25:42 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
export default {
|
|
|
|
name: "Notification",
|
|
|
|
props: ["notification"],
|
2020-05-01 17:24:22 +00:00
|
|
|
mounted() {
|
|
|
|
this.ready = true;
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
ready: false
|
|
|
|
};
|
|
|
|
},
|
2020-04-12 14:25:42 +00:00
|
|
|
methods: {
|
|
|
|
close() {
|
|
|
|
this.$emit("onClose");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|