Skip to content

Commit fc6303a

Browse files
committed
refactor: delete header and lead from CJumbotron
1 parent 941dfe2 commit fc6303a

File tree

4 files changed

+1
-32
lines changed

4 files changed

+1
-32
lines changed

src/components/index.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,6 @@ export declare class CImgLazy extends CImg {
326326
export declare class CJumbotron extends Vue {
327327
tag: string
328328
fluid: boolean
329-
header: string
330-
lead: string
331329
color: string
332330
borderColor: string
333331
textColor: string

src/components/jumbotron/CJumbotron.vue

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,14 @@ export default {
1010
default: 'div'
1111
},
1212
fluid: Boolean,
13-
header: String,
14-
lead: String,
1513
color: String,
1614
borderColor: String,
1715
textColor: String,
1816
},
1917
render (h, { props, data, slots }) {
20-
let childNodes = []
18+
let childNodes = slots().default
2119
const $slots = slots()
2220
23-
if ($slots.header || props.header) {
24-
const header = $slots.header ||
25-
h('h1', { staticClass: 'display-3' }, props.header)
26-
childNodes.push(header)
27-
}
28-
29-
if ($slots.lead || props.lead) {
30-
const lead = $slots.lead || h('p', { staticClass: 'lead' }, props.lead)
31-
childNodes.push(lead)
32-
}
33-
34-
if ($slots.default) {
35-
childNodes.push($slots.default)
36-
}
37-
3821
if (props.fluid) {
3922
childNodes = [
4023
h(

src/components/jumbotron/tests/CJumbotron.spec.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ const defaultWrapper = mount(Component)
66
const customWrapper = mount(Component, {
77
propsData: {
88
fluid: true,
9-
header: 'header',
10-
lead: 'lead',
119
color: 'success',
1210
borderColor: 'secondary',
1311
textColor: 'dark'

src/components/jumbotron/tests/__snapshots__/CJumbotron.spec.js.snap

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,6 @@ exports[`CJumbotron renders correctly 2`] = `
1313
<div
1414
class="container-fluid"
1515
>
16-
<h1
17-
class="display-3"
18-
>
19-
header
20-
</h1>
21-
<p
22-
class="lead"
23-
>
24-
lead
25-
</p>
2616
content
2717
</div>
2818
</div>

0 commit comments

Comments
 (0)