forked from creativetimofficial/vue-argon-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCard.vue
70 lines (68 loc) · 1.6 KB
/
Card.vue
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<template>
<div
class="card"
:class="[
{ 'card-lift--hover': hover },
{ shadow: shadow },
{ [`shadow-${shadowSize}`]: shadowSize },
{ [`bg-gradient-${gradient}`]: gradient },
{ [`bg-${type}`]: type },
]"
>
<div class="card-header" :class="headerClasses" v-if="$slots.header">
<slot name="header"> </slot>
</div>
<div class="card-body" :class="bodyClasses" v-if="!noBody">
<slot></slot>
</div>
<slot v-if="noBody"></slot>
<div class="card-footer" :class="footerClasses" v-if="$slots.footer">
<slot name="footer"></slot>
</div>
</div>
</template>
<script>
export default {
name: "card",
props: {
type: {
type: String,
description: "Card type",
},
gradient: {
type: String,
description: "Card background gradient type (warning,danger etc)",
},
hover: {
type: Boolean,
description: "Whether card should move on hover",
},
shadow: {
type: Boolean,
description: "Whether card has shadow",
},
shadowSize: {
type: String,
description: "Card shadow size",
},
noBody: {
type: Boolean,
default: false,
description: "Whether card should have wrapper body class",
},
bodyClasses: {
type: [String, Object, Array],
description: "Card body css classes",
},
headerClasses: {
type: [String, Object, Array],
description: "Card header css classes",
},
footerClasses: {
type: [String, Object, Array],
description: "Card footer css classes",
},
},
};
</script>
<style></style>