Skip to content

Commit 3b3bb00

Browse files
committed
refactor: CJumbotron: delete container-fluid wrapper
1 parent 3b2577a commit 3b3bb00

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

src/components/jumbotron/CJumbotron.vue

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,7 @@ export default {
1414
borderColor: String,
1515
textColor: String,
1616
},
17-
render (h, { props, data, slots }) {
18-
let childNodes = slots().default
19-
20-
if (props.fluid) {
21-
childNodes = [
22-
h(
23-
'div',
24-
{ staticClass: 'container-fluid' },
25-
childNodes
26-
)
27-
]
28-
}
29-
17+
render (h, { props, data, children }) {
3018
return h(
3119
props.tag,
3220
mergeData(data, {
@@ -39,7 +27,7 @@ export default {
3927
'border': Boolean(props.borderColor)
4028
}
4129
}),
42-
childNodes
30+
children
4331
)
4432
}
4533
}

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ exports[`CJumbotron renders correctly 2`] = `
1010
<div
1111
class="jumbotron jumbotron-fluid text-dark bg-success border-secondary border"
1212
>
13-
<div
14-
class="container-fluid"
15-
>
13+
<template>
1614
content
17-
</div>
15+
</template>
1816
</div>
1917
`;

0 commit comments

Comments
 (0)