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(
1111 headerHtml: String ,
1212 bodyHtml: String ,
1313 footerHtml: String ,
14- bodyWrapper: Boolean
14+ bodyWrapper: Boolean ,
15+ accentColor: String
1516 }
1617)
1718export default {
@@ -42,10 +43,11 @@ export default {
4243 mergeData (data, {
4344 staticClass: ' card' ,
4445 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
4951 }
5052 }),
5153 [ header, main, footer ]
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const slotWrapper = mount(Component, {
2222 color : 'success' ,
2323 textColor : 'white' ,
2424 borderColor : 'solid' ,
25+ accentColor : 'primary' ,
2526 bodyWrapper : true
2627 }
2728 } ,
@@ -49,7 +50,7 @@ describe(ComponentName, () => {
4950 it ( 'renders correctly with slots' , ( ) => {
5051 expect ( slotWrapper . element ) . toMatchSnapshot ( )
5152 } )
52- it ( 'renders correctly with slots ' , ( ) => {
53+ it ( 'renders correctly without body ' , ( ) => {
5354 expect ( noBodyCard . element ) . toMatchSnapshot ( )
5455 } )
5556} ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ exports[`CCard renders correctly 1`] = `
2424
2525exports [` CCard renders correctly with slots 1` ] = `
2626<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"
2828>
2929 <!---->
3030 <div
@@ -36,7 +36,7 @@ exports[`CCard renders correctly with slots 1`] = `
3636</div >
3737` ;
3838
39- exports [` CCard renders correctly with slots 2 ` ] = `
39+ exports [` CCard renders correctly without body 1 ` ] = `
4040<div
4141 class = " card"
4242>
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ export declare class CCard extends CardSharedClasses {
6666 bodyHtml : string
6767 footerHtml : string
6868 bodyWrapper : boolean
69+ accentColor : string
6970}
7071
7172export declare class CCardBody extends CardSharedClasses { }
You can’t perform that action at this time.
0 commit comments