Skip to content

Commit

Permalink
feat: [Request] QModal to support Array syntax for content-css and co…
Browse files Browse the repository at this point in the history
…ntent-classes #856
  • Loading branch information
rstoenescu committed Sep 9, 2017
1 parent 85815b8 commit b89b060
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/components/modal/QModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ export default {
type: String,
default: 'flex-center'
},
contentClasses: [Object, String],
contentCss: [Object, String],
contentClasses: [Object, Array, String],
contentCss: [Object, Array, String],
noBackdropDismiss: {
type: Boolean,
default: false
Expand Down Expand Up @@ -134,13 +134,19 @@ export default {
},
modalCss () {
if (this.position) {
return extend(
const css = Array.isArray(this.contentCss)
? this.contentCss
: [this.contentCss]
css.unshift(extend(
{},
positionCSS[this.$q.theme],
additionalCSS(this.$q.theme, this.position),
this.contentCss
)
additionalCSS(this.$q.theme, this.position)
))
return css
}
return this.contentCss
}
},
Expand Down

0 comments on commit b89b060

Please sign in to comment.