File tree Expand file tree Collapse file tree 9 files changed +135
-193
lines changed Expand file tree Collapse file tree 9 files changed +135
-193
lines changed Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div class =" c-card" >
3
+ <div
4
+ class =" c-card-header c-content-center c-text-white c-p-0"
5
+ :class =" [`c-bg-${variant}`, addHeaderClasses]"
6
+ >
7
+ <slot ></slot >
8
+ </div >
9
+ <slot name =" body" >
10
+ <div class =" c-card-body c-row c-text-center" >
11
+ <div class =" c-col" >
12
+ <div v-if =" rightHeader" class =" c-text-value-lg" >
13
+ {{rightHeader}}
14
+ </div >
15
+ <div v-if =" rightFooter" class =" c-text-uppercase c-text-muted c-small" >
16
+ {{rightFooter}}
17
+ </div >
18
+ </div >
19
+ <div class =" c-vr" ></div >
20
+ <div class =" c-col" >
21
+ <div v-if =" leftHeader" class =" c-text-value-lg" >
22
+ {{leftHeader}}
23
+ </div >
24
+ <div v-if =" leftFooter" class =" c-text-uppercase c-text-muted c-small" >
25
+ {{leftFooter}}
26
+ </div >
27
+ </div >
28
+ </div >
29
+ </slot >
30
+ </div >
31
+ </template >
32
+
33
+ <script >
34
+ export default {
35
+ name: ' CWidgetBrand' ,
36
+ props: {
37
+ variant: {
38
+ type: String ,
39
+ variant: ' primary'
40
+ },
41
+ rightHeader: String ,
42
+ rightFooter: String ,
43
+ leftHeader: String ,
44
+ leftFooter: String ,
45
+ addHeaderClasses: String
46
+ }
47
+ }
48
+ </script >
49
+
50
+ <style lang="scss">
51
+ @import " ~@coreui/coreui/scss/partials/widgets.scss" ;
52
+ @import " ~@coreui/coreui/scss/partials/card.scss" ;
53
+ @import " ~@coreui/coreui/scss/partials/grid.scss" ;
54
+ @import " ~@coreui/coreui/scss/utilities/_position.scss" ;
55
+ @import " ~@coreui/coreui/scss/utilities/_spacing.scss" ;
56
+ @import " ~@coreui/coreui/scss/utilities/_text.scss" ;
57
+ @import " ~@coreui/coreui/scss/utilities/_background.scss" ;
58
+ </style >
Original file line number Diff line number Diff line change 1
- <template functional>
2
- <div class =" c-card" :class =" `c-bg-${props.variant}`" >
1
+ <template >
2
+ <div class =" c-card" :class =" `c-bg-${variant}`" >
3
+ <slot name =" header" ></slot >
3
4
<div class =" c-card-body c-pb-0" >
4
- <slot name = " dropdown " ></slot >
5
- <h4 class =" c-mb-0" >{{props. header}}</h4 >
6
- <p >{{props. text}}</p >
5
+ <slot ></slot >
6
+ <h4 v-if = " header " class =" c-mb-0" >{{header}}</h4 >
7
+ <p v-if = " text " >{{text}}</p >
7
8
</div >
8
- <slot ></slot >
9
+ <slot name = " footer " ></slot >
9
10
</div >
10
11
</template >
11
12
@@ -17,14 +18,8 @@ export default {
17
18
type: String ,
18
19
default: ' primary'
19
20
},
20
- header: {
21
- type: String ,
22
- default: ' header:string'
23
- },
24
- text: {
25
- type: String ,
26
- default: ' text:string'
27
- }
21
+ header: String ,
22
+ text: String
28
23
}
29
24
}
30
25
</script >
Original file line number Diff line number Diff line change 1
- <template functional >
2
- <div class =" c-card" :class =" `c-bg-${props. variant}`" >
1
+ <template >
2
+ <div class =" c-card" :class =" `c-bg-${variant}`" >
3
3
<div class =" c-card-header" >
4
4
<div class =" c-font-weight-bold" >
5
- <span >{{props. rightHeader}}</span >
6
- <span class =" c-float-right" >{{props. leftHeader}}</span >
5
+ <span v-if = " rightHeader " >{{rightHeader}}</span >
6
+ <span v-if = " leftHeader " class =" c-float-right" >{{leftHeader}}</span >
7
7
</div >
8
8
<div >
9
9
<span >
10
- <small >{{props. rightFooter}}</small >
10
+ <small v-if = " rightFooter " >{{rightFooter}}</small >
11
11
</span >
12
12
<span class =" c-float-right" >
13
- <small >{{props. leftFooter}}</small >
13
+ <small v-if = " leftFooter " >{{leftFooter}}</small >
14
14
</span >
15
15
</div >
16
16
<slot ></slot >
20
20
21
21
<script >
22
22
export default {
23
- name: ' CWidgetSmallText ' ,
23
+ name: ' CWidgetHeaderDetails ' ,
24
24
props: {
25
25
variant: {
26
26
type: String ,
27
27
default: ' primary'
28
28
},
29
- rightHeader: {
30
- type: String ,
31
- default: ' rightHeader:string'
32
- },
33
- rightFooter: {
34
- type: String ,
35
- default: ' rightFooter:string'
36
- },
37
- leftHeader: {
38
- type: String ,
39
- default: ' leftHeader:string'
40
- },
41
- leftFooter: {
42
- type: String ,
43
- default: ' leftFooter:string'
44
- }
29
+ rightHeader: String ,
30
+ rightFooter: String ,
31
+ leftHeader: String ,
32
+ leftFooter: String
45
33
}
46
34
}
47
35
</script >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" c-card" >
3
+ <slot name =" header" ></slot >
3
4
<div
4
5
class =" c-card-body c-clearfix c-d-flex c-align-items-center"
5
6
:class =" noPadding ? 'c-p-0' : 'c-p-3'"
10
11
>
11
12
<slot ></slot >
12
13
</div >
13
-
14
14
<div >
15
- <div :class =" `c-text-value c-text-${variant}`" >
15
+ <div v-if = " header " :class =" `c-text-value c-text-${variant}`" >
16
16
{{header}}
17
17
</div >
18
- <div class =" c-text-muted c-text-uppercase c-font-weight-bold c-small" >
18
+ <div
19
+ v-if =" text"
20
+ class =" c-text-muted c-text-uppercase c-font-weight-bold c-small"
21
+ >
19
22
{{text}}
20
23
</div >
21
24
</div >
22
25
</div >
23
- <div
24
- v-if =" link || $slots.link"
25
- class =" c-card-footer c-px-3 c-py-2"
26
- >
27
- <slot name =" link" >
28
- <CLink
29
- class =" c-font-weight-bold c-font-xs c-btn-block c-text-muted"
30
- :href =" link"
31
- >
32
- {{linkText}}
33
- <CIcon name =" arrowRight" class =" c-float-right" width =" 16" />
34
- </CLink >
35
- </slot >
36
- </div >
26
+ <slot name =" footer" ></slot >
37
27
</div >
38
28
</template >
39
29
40
30
<script >
41
- import CLink from ' ../Link/CLink'
42
- import { CIcon as CIconRaw } from ' @coreui/icons/vue'
43
- import { arrowRight } from ' @coreui/icons'
44
- const CIcon = Object .assign ({}, CIconRaw, { icons : { arrowRight }})
45
-
46
31
export default {
47
32
name: ' CWidgetIcon' ,
48
- components: { CLink, CIcon },
49
33
props: {
50
- addIconClasses: String ,
51
- header: {
52
- type: String ,
53
- default: ' header:string'
54
- },
55
- text: {
56
- type: String ,
57
- default: ' text:string'
58
- },
59
- linkText: {
60
- type: String ,
61
- default: ' View More'
62
- },
63
- link: String ,
34
+ header: String ,
35
+ text: String ,
64
36
noPadding: Boolean ,
65
37
variant: {
66
38
type: String ,
Original file line number Diff line number Diff line change 1
- <template functional>
2
- <div :class =" props.inverse ? `c-card c-text-white c-bg-${props.variant}` : 'c-card'" >
1
+ <template >
2
+ <div :class =" inverse ? `c-card c-text-white c-bg-${variant}` : 'c-card'" >
3
+ <slot name =" header" ></slot >
3
4
<div class =" c-card-body" >
4
- <div class =" c-h4 c-m-0" >{{props. header}}</div >
5
- <div >{{props. text}}</div >
5
+ <div v-if = " header " class =" c-h4 c-m-0" >{{header}}</div >
6
+ <div v-if = " text " >{{text}}</div >
6
7
<slot >
7
8
<CProgress
8
- :variant =" !props. inverse ? props. variant : ''"
9
- :value = " props. value"
10
- :class =" props. inverse ? 'c-progress-white' : ''"
9
+ :variant =" !inverse ? variant : ''"
10
+ :value = " value"
11
+ :class =" inverse ? 'c-progress-white' : ''"
11
12
class =" c-progress-xs c-my-3 c-mb-0"
12
13
/>
13
14
</slot >
14
- <small class =" c-text-muted" >
15
- {{props. footer}}
15
+ <small v-if = " footer " class =" c-text-muted" >
16
+ {{footer}}
16
17
</small >
17
18
</div >
19
+ <slot name =" footer" ></slot >
18
20
</div >
19
21
</template >
20
22
@@ -26,19 +28,13 @@ export default {
26
28
CProgress
27
29
},
28
30
props: {
29
- header: {
31
+ header: String ,
32
+ text: String ,
33
+ footer: String ,
34
+ variant: {
30
35
type: String ,
31
- default: ' header:string '
36
+ default: ' primary '
32
37
},
33
- text: {
34
- type: String ,
35
- default: ' text:string'
36
- },
37
- footer: {
38
- type: String ,
39
- default: ' footer:string'
40
- },
41
- variant: String ,
42
38
inverse: Boolean ,
43
39
value: {
44
40
type: Number ,
Original file line number Diff line number Diff line change 1
- <template functional>
2
- <div :class =" props.inverse ? `c-card c-text-white c-bg-${props.variant}` : 'c-card'" >
1
+ <template >
2
+ <div :class =" inverse ? `c-card c-text-white c-bg-${variant}` : 'c-card'" >
3
+ <slot name =" header" ></slot >
3
4
<div class =" c-card-body" >
4
5
<div
5
6
v-if =" $slots.default"
6
7
class =" c-h1 c-text-muted c-text-right c-mb-4"
7
8
>
8
9
<slot ></slot >
9
- <!-- <i :class="props.iconClasses"></i> -->
10
10
</div >
11
- <div class =" c-h4 c-mb-0" >{{props.header}}</div >
12
- <small class =" c-text-muted c-text-uppercase c-font-weight-bold" >
13
- {{props.text}}
11
+ <div v-if =" header" class =" c-h4 c-mb-0" >{{header}}</div >
12
+ <small
13
+ v-if =" text"
14
+ class =" c-text-muted c-text-uppercase c-font-weight-bold"
15
+ >
16
+ {{text}}
14
17
</small >
15
18
<slot name =" progress" >
16
19
<CProgress
17
- :variant =" !props. inverse ? props. variant : ''"
18
- :value =" props. value"
19
- :class =" props. inverse ? 'c-progress-white' : ''"
20
+ :variant =" !inverse ? variant : ''"
21
+ :value =" value"
22
+ :class =" inverse ? 'c-progress-white' : ''"
20
23
class =" c-progress-xs c-my-3 c-mb-0"
21
24
/>
22
25
</slot >
23
26
</div >
27
+ <slot name =" footer" ></slot >
24
28
</div >
25
29
</template >
26
30
@@ -32,16 +36,12 @@ export default {
32
36
CProgress
33
37
},
34
38
props: {
35
- iconClasses: String ,
36
- header: {
37
- type: String ,
38
- default: ' header:string'
39
- },
40
- text: {
39
+ header: String ,
40
+ text: String ,
41
+ variant: {
41
42
type: String ,
42
- default: ' text:string '
43
+ default: ' primary '
43
44
},
44
- variant: String ,
45
45
inverse: Boolean ,
46
46
value: {
47
47
type: Number ,
Original file line number Diff line number Diff line change 1
- <template functional >
1
+ <template >
2
2
<div class =" c-card" >
3
+ <slot name =" header" ></slot >
3
4
<div class =" c-card-body c-text-center" >
4
- <div class =" c-text-muted c-small c-text-uppercase c-font-weight-bold" >
5
- {{props.header}}
5
+ <div
6
+ v-if =" header"
7
+ class =" c-text-muted c-small c-text-uppercase c-font-weight-bold"
8
+ >
9
+ {{header}}
6
10
</div >
7
- <div class =" c-h2 c-py-3" >{{props. text}}</div >
11
+ <div v-if = " text " class =" c-h2 c-py-3" >{{text}}</div >
8
12
<slot ></slot >
9
13
</div >
14
+ <slot name =" footer" ></slot >
10
15
</div >
11
16
</template >
12
17
13
18
<script >
14
19
export default {
15
20
name: ' CWidgetSimple' ,
16
21
props: {
17
- header: {
18
- type: String ,
19
- default: ' header:string'
20
- },
21
- text: {
22
- type: String ,
23
- default: ' text:string'
24
- }
22
+ header: String ,
23
+ text: String
25
24
}
26
25
}
27
26
</script >
You can’t perform that action at this time.
0 commit comments