Commit 00b835ba authored by Phil Hughes's avatar Phil Hughes Committed by Fatih Acet

Props use objects with required & type values

parent 103c78f1
...@@ -6,9 +6,24 @@ ...@@ -6,9 +6,24 @@
window.gl.issueBoards = window.gl.issueBoards || {}; window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.IssueCardInner = Vue.extend({ gl.issueBoards.IssueCardInner = Vue.extend({
props: [ props: {
'issue', 'issueLinkBase', 'list', 'rootPath', issue: {
], type: Object,
required: true,
},
issueLinkBase: {
type: String,
required: true,
},
list: {
type: Object,
required: false,
},
rootPath: {
type: String,
required: true,
},
},
methods: { methods: {
showLabel(label) { showLabel(label) {
if (!this.list) return true; if (!this.list) return true;
......
...@@ -6,9 +6,16 @@ ...@@ -6,9 +6,16 @@
data() { data() {
return ModalStore.store; return ModalStore.store;
}, },
props: [ props: {
'image', 'newIssuePath', image: {
], type: String,
required: true,
},
newIssuePath: {
type: String,
required: true,
},
},
computed: { computed: {
contents() { contents() {
const obj = { const obj = {
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
}, },
}, },
components: { components: {
listsDropdown: gl.issueBoards.ModalFooterListsDropdown, 'lists-dropdown': gl.issueBoards.ModalFooterListsDropdown,
}, },
template: ` template: `
<footer <footer
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
}, },
}, },
components: { components: {
modalTabs: gl.issueBoards.ModalTabs, 'modal-tabs': gl.issueBoards.ModalTabs,
}, },
template: ` template: `
<div> <div>
......
...@@ -8,10 +8,24 @@ ...@@ -8,10 +8,24 @@
const ModalStore = gl.issueBoards.ModalStore; const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.IssuesModal = Vue.extend({ gl.issueBoards.IssuesModal = Vue.extend({
props: [ props: {
'blankStateImage', 'newIssuePath', 'issueLinkBase', blankStateImage: {
'rootPath', type: String,
], required: true,
},
newIssuePath: {
type: String,
required: true,
},
issueLinkBase: {
type: String,
required: true,
},
rootPath: {
type: String,
required: true,
},
},
data() { data() {
return ModalStore.store; return ModalStore.store;
}, },
...@@ -76,10 +90,10 @@ ...@@ -76,10 +90,10 @@
}, },
}, },
components: { components: {
modalHeader: gl.issueBoards.IssuesModalHeader, 'modal-header': gl.issueBoards.IssuesModalHeader,
modalList: gl.issueBoards.ModalList, 'modal-list': gl.issueBoards.ModalList,
modalFooter: gl.issueBoards.ModalFooter, 'modal-footer': gl.issueBoards.ModalFooter,
emptyState: gl.issueBoards.ModalEmptyState, 'empty-state': gl.issueBoards.ModalEmptyState,
}, },
template: ` template: `
<div <div
......
...@@ -6,9 +6,16 @@ ...@@ -6,9 +6,16 @@
const ModalStore = gl.issueBoards.ModalStore; const ModalStore = gl.issueBoards.ModalStore;
gl.issueBoards.ModalList = Vue.extend({ gl.issueBoards.ModalList = Vue.extend({
props: [ props: {
'issueLinkBase', 'rootPath', issueLinkBase: {
], type: String,
required: true,
},
rootPath: {
type: String,
required: true,
},
},
data() { data() {
return ModalStore.store; return ModalStore.store;
}, },
...@@ -94,7 +101,7 @@ ...@@ -94,7 +101,7 @@
this.destroyMasonry(); this.destroyMasonry();
}, },
components: { components: {
issueCardInner: gl.issueBoards.IssueCardInner, 'issue-card-inner': gl.issueBoards.IssueCardInner,
}, },
template: ` template: `
<section <section
......
...@@ -6,9 +6,16 @@ ...@@ -6,9 +6,16 @@
window.gl.issueBoards = window.gl.issueBoards || {}; window.gl.issueBoards = window.gl.issueBoards || {};
gl.issueBoards.RemoveIssueBtn = Vue.extend({ gl.issueBoards.RemoveIssueBtn = Vue.extend({
props: [ props: {
'issue', 'list', issue: {
], type: Object,
required: true,
},
list: {
type: Object,
required: true,
},
},
methods: { methods: {
removeIssue() { removeIssue() {
const lists = this.issue.getLists(); const lists = this.issue.getLists();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment