forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQCard.js
More file actions
38 lines (36 loc) · 733 Bytes
/
QCard.js
File metadata and controls
38 lines (36 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
export default {
name: 'QCard',
props: {
square: Boolean,
flat: Boolean,
inline: Boolean,
color: String,
textColor: String
},
computed: {
classes () {
const cls = [{
'no-border-radius': this.square,
'no-shadow': this.flat,
'inline-block': this.inline
}]
if (this.color) {
cls.push(`bg-${this.color}`)
cls.push(`q-card-dark`)
cls.push(`text-${this.textColor || 'white'}`)
}
else if (this.textColor) {
cls.push(`text-${this.textColor}`)
}
return cls
}
},
render (h) {
return h('div', {
staticClass: 'q-card',
'class': this.classes
}, [
this.$slots.default
])
}
}