2019-05-23 19:40:39 +02:00

33 lines
555 B
Vue

<template>
<div>
<notification
v-for="notification in notifications"
:key="notification.id"
:notification="notification"
@read="markAsRead(notification.id)"
/>
</div>
</template>
<script>
import Notification from '../Notification'
export default {
name: 'NotificationList',
components: {
Notification,
},
props: {
notifications: {
type: Array,
required: true,
},
},
methods: {
markAsRead(notificationId) {
this.$emit('markAsRead', notificationId)
},
},
}
</script>