Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit e391ba0

Browse files
committed
Added validator for type prop in notification
1 parent 08e5e70 commit e391ba0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/Notification/main.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ export default {
4242
type: {
4343
type: String,
4444
default: 'info',
45+
validator(type) {
46+
return ['info', 'success', 'warning', 'error'].indexOf(type) > -1;
47+
},
4548
},
4649
title: {
4750
type: String,

0 commit comments

Comments
 (0)