This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
seepur/resources/scripts/applications/shared/components/Notification.vue

29 lines
527 B
Vue
Raw Normal View History

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>