File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ const props = Object.assign(
11
11
headerHtml: String ,
12
12
bodyHtml: String ,
13
13
footerHtml: String ,
14
- bodyWrapper: Boolean
14
+ bodyWrapper: Boolean ,
15
+ accentColor: String
15
16
}
16
17
)
17
18
export default {
@@ -42,10 +43,11 @@ export default {
42
43
mergeData (data, {
43
44
staticClass: ' card' ,
44
45
class: {
45
- [` text-${ props .align } ` ]: Boolean (props .align ),
46
- [` bg-${ props .color } ` ]: Boolean (props .color ),
47
- [` border-${ props .borderColor } ` ]: Boolean (props .borderColor ),
48
- [` text-${ props .textColor } ` ]: Boolean (props .textColor )
46
+ [` card-accent-${ props .accentColor } ` ]: props .accentColor ,
47
+ [` text-${ props .align } ` ]: props .align ,
48
+ [` bg-${ props .color } ` ]: props .color ,
49
+ [` border-${ props .borderColor } ` ]: props .borderColor ,
50
+ [` text-${ props .textColor } ` ]: props .textColor
49
51
}
50
52
}),
51
53
[ header, main, footer ]
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const slotWrapper = mount(Component, {
22
22
color : 'success' ,
23
23
textColor : 'white' ,
24
24
borderColor : 'solid' ,
25
+ accentColor : 'primary' ,
25
26
bodyWrapper : true
26
27
}
27
28
} ,
@@ -49,7 +50,7 @@ describe(ComponentName, () => {
49
50
it ( 'renders correctly with slots' , ( ) => {
50
51
expect ( slotWrapper . element ) . toMatchSnapshot ( )
51
52
} )
52
- it ( 'renders correctly with slots ' , ( ) => {
53
+ it ( 'renders correctly without body ' , ( ) => {
53
54
expect ( noBodyCard . element ) . toMatchSnapshot ( )
54
55
} )
55
56
} ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ exports[`CCard renders correctly 1`] = `
24
24
25
25
exports [` CCard renders correctly with slots 1` ] = `
26
26
<div
27
- class = " card text-left bg-success border-solid text-white"
27
+ class = " card card-accent-primary text-left bg-success border-solid text-white"
28
28
>
29
29
<!---->
30
30
<div
@@ -36,7 +36,7 @@ exports[`CCard renders correctly with slots 1`] = `
36
36
</div >
37
37
` ;
38
38
39
- exports [` CCard renders correctly with slots 2 ` ] = `
39
+ exports [` CCard renders correctly without body 1 ` ] = `
40
40
<div
41
41
class = " card"
42
42
>
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ export declare class CCard extends CardSharedClasses {
66
66
bodyHtml : string
67
67
footerHtml : string
68
68
bodyWrapper : boolean
69
+ accentColor : string
69
70
}
70
71
71
72
export declare class CCardBody extends CardSharedClasses { }
You can’t perform that action at this time.
0 commit comments