Skip to content

Commit e965668

Browse files
committed
refactor: widget components: delete unused slots, update test snapshots
1 parent fefff24 commit e965668

10 files changed

+5
-26
lines changed

src/components/Widgets/CWidgetDropdown.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div class="card" :class="`bg-${color} text-white`">
3-
<slot name="header"></slot>
43
<div class="card-body pb-0">
54
<slot></slot>
65
<h4 v-if="header" class="mb-0">{{header}}</h4>

src/components/Widgets/CWidgetIcon.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div class="card">
3-
<slot name="header"></slot>
43
<div
54
class="card-body clearfix d-flex align-items-center"
65
:class="noIconPadding ? 'p-0' : 'p-3'"
@@ -23,7 +22,6 @@
2322
</div>
2423
</div>
2524
</div>
26-
<slot name="footer"></slot>
2725
</div>
2826
</template>
2927

src/components/Widgets/CWidgetProgress.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div :class="inverse ? `card text-white bg-${color}` : 'card'">
3-
<slot name="header"></slot>
43
<div class="card-body">
54
<div v-if="header" class="h4 m-0">{{header}}</div>
65
<div v-if="text">{{text}}</div>
@@ -16,7 +15,6 @@
1615
{{footer}}
1716
</small>
1817
</div>
19-
<slot name="footer"></slot>
2018
</div>
2119
</template>
2220

src/components/Widgets/CWidgetProgressIcon.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<template>
22
<div :class="inverse ? `card text-white bg-${color}` : 'card'">
3-
<slot name="header"></slot>
43
<div class="card-body">
54
<div
65
v-if="$slots.default"
@@ -24,7 +23,6 @@
2423
/>
2524
</slot>
2625
</div>
27-
<slot name="footer"></slot>
2826
</div>
2927
</template>
3028

src/components/Widgets/CWidgetSimple.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<template>
22
<div class="card">
3-
<slot name="header"></slot>
43
<div class="card-body text-center">
54
<div
65
v-if="header"
76
class="text-muted small text-uppercase font-weight-bold"
87
>
98
{{header}}
109
</div>
11-
<div v-if="text" class="h2 py-3">{{text}}</div>
10+
<div v-if="text" class="h2 py-3">
11+
{{text}}
12+
</div>
1213
<slot></slot>
1314
</div>
14-
<slot name="footer"></slot>
1515
</div>
1616
</template>
1717

src/components/Widgets/tests/__snapshots__/CWidgetDropdown.spec.js.snap

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ exports[`CWidgetDropdown matches custom props snapshot 1`] = `
44
<div
55
class="card bg-info text-white"
66
>
7-
87
<div
98
class="card-body pb-0"
109
>
@@ -27,7 +26,6 @@ exports[`CWidgetDropdown matches default props snapshot 1`] = `
2726
<div
2827
class="card bg-undefined text-white"
2928
>
30-
3129
<div
3230
class="card-body pb-0"
3331
>

src/components/Widgets/tests/__snapshots__/CWidgetIcon.spec.js.snap

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ exports[`CWidgetIcon matches custom props snapshot 1`] = `
44
<div
55
class="card"
66
>
7-
87
<div
98
class="card-body clearfix d-flex align-items-center p-0"
109
>
@@ -30,15 +29,13 @@ exports[`CWidgetIcon matches custom props snapshot 1`] = `
3029
</div>
3130
</div>
3231
</div>
33-
3432
</div>
3533
`;
3634

3735
exports[`CWidgetIcon matches default props snapshot 1`] = `
3836
<div
3937
class="card"
4038
>
41-
4239
<div
4340
class="card-body clearfix d-flex align-items-center p-3"
4441
>
@@ -52,6 +49,5 @@ exports[`CWidgetIcon matches default props snapshot 1`] = `
5249
<!---->
5350
</div>
5451
</div>
55-
5652
</div>
5753
`;

src/components/Widgets/tests/__snapshots__/CWidgetProgress.spec.js.snap

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ exports[`CWidgetProgress matches custom props snapshot 1`] = `
44
<div
55
class="card text-white bg-info"
66
>
7-
87
<div
98
class="card-body"
109
>
@@ -41,15 +40,13 @@ exports[`CWidgetProgress matches custom props snapshot 1`] = `
4140
4241
</small>
4342
</div>
44-
4543
</div>
4644
`;
4745

4846
exports[`CWidgetProgress matches default props snapshot 1`] = `
4947
<div
5048
class="card"
5149
>
52-
5350
<div
5451
class="card-body"
5552
>
@@ -74,6 +71,5 @@ exports[`CWidgetProgress matches default props snapshot 1`] = `
7471
7572
<!---->
7673
</div>
77-
7874
</div>
7975
`;

src/components/Widgets/tests/__snapshots__/CWidgetProgressIcon.spec.js.snap

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ exports[`CWidgetProgressIcon matches custom props snapshot 1`] = `
55
class="card text-white bg-info"
66
iconclasses="icon-custom"
77
>
8-
98
<div
109
class="card-body"
1110
>
@@ -40,15 +39,13 @@ exports[`CWidgetProgressIcon matches custom props snapshot 1`] = `
4039
</div>
4140
</div>
4241
</div>
43-
4442
</div>
4543
`;
4644

4745
exports[`CWidgetProgressIcon matches default props snapshot 1`] = `
4846
<div
4947
class="card"
5048
>
51-
5249
<div
5350
class="card-body"
5451
>
@@ -73,6 +70,5 @@ exports[`CWidgetProgressIcon matches default props snapshot 1`] = `
7370
</div>
7471
</div>
7572
</div>
76-
7773
</div>
7874
`;

src/components/Widgets/tests/__snapshots__/CWidgetSimple.spec.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ exports[`CWidgetSimple matches custom props snapshot 1`] = `
44
<div
55
class="card"
66
>
7-
87
<div
98
class="card-body text-center"
109
>
@@ -19,10 +18,11 @@ exports[`CWidgetSimple matches custom props snapshot 1`] = `
1918
<div
2019
class="h2 py-3"
2120
>
21+
2222
text
23+
2324
</div>
2425
2526
</div>
26-
2727
</div>
2828
`;

0 commit comments

Comments
 (0)