Add global mixin for modal
This allows the modal to be used anywhere in the component hierarchy, rather than requiring it to be in the top level.
This commit is contained in:
20
js/mixins/modal.js
Normal file
20
js/mixins/modal.js
Normal file
@@ -0,0 +1,20 @@
|
||||
export default {
|
||||
methods: {
|
||||
closeModal: function(name) {
|
||||
this.modals[name] = false
|
||||
},
|
||||
openModal: function (name) {
|
||||
this.modals[name] = true
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
modals: {
|
||||
styleguideModal: false,
|
||||
newProjectConfirmation: false,
|
||||
pendingFinancialVerification: false,
|
||||
pendingCCPOApproval: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user