mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-24 01:03:35 +01:00
45 lines
873 B
Vue
45 lines
873 B
Vue
<template>
|
|
<div class="notification" :class="type" v-if="show">
|
|
<button class="delete" v-if="isDeletable" @click="close"></button>
|
|
{{ message }}
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'Notification',
|
|
|
|
data() {
|
|
return {
|
|
show: true
|
|
}
|
|
},
|
|
|
|
props: {
|
|
type: {
|
|
type: String,
|
|
default: 'is-primary'
|
|
},
|
|
|
|
message: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
|
|
isDeletable: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
},
|
|
|
|
methods: {
|
|
|
|
close (event) {
|
|
if (event) {
|
|
this.show = false
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
</script> |