Skip to content

Commit d7f6cf9

Browse files
committed
fix: CNavbarNav: delete unsupported props
1 parent 7a48b9c commit d7f6cf9

File tree

4 files changed

+8
-21
lines changed

4 files changed

+8
-21
lines changed

src/components/Navbar/CNavbarNav.vue

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,13 @@ export default {
77
tag: {
88
type: String,
99
default: 'ul'
10-
},
11-
fill: Boolean,
12-
justified: Boolean,
10+
}
1311
},
1412
render (h, { props, data, children }) {
1513
return h(
1614
props.tag,
1715
mergeData(data, {
18-
staticClass: 'navbar-nav',
19-
class: {
20-
'nav-fill': props.fill,
21-
'nav-justified': props.justified
22-
}
16+
staticClass: 'navbar-nav'
2317
}),
2418
children
2519
)

src/components/Navbar/tests/CNavbarNav.spec.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ const ComponentName = 'CNavbar'
55
const defaultWrapper = mount(Component)
66
const customWrapper = mount(Component, {
77
propsData: {
8-
fill: true,
9-
justified: true,
10-
pills: true,
11-
vertical: true
8+
tag: 'div'
129
},
1310
slots: {
1411
default: 'CNavbar items'
@@ -22,7 +19,7 @@ describe(ComponentName, () => {
2219
it('renders correctly', () => {
2320
expect(defaultWrapper.element).toMatchSnapshot()
2421
})
25-
it('renders correctly', () => {
22+
it('renders correctly with content', () => {
2623
expect(customWrapper.element).toMatchSnapshot()
2724
})
2825
})

src/components/Navbar/tests/__snapshots__/CNavbarNav.spec.js.snap

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@ exports[`CNavbar renders correctly 1`] = `
66
/>
77
`;
88

9-
exports[`CNavbar renders correctly 2`] = `
10-
<ul
11-
class="navbar-nav nav-fill nav-justified"
12-
pills="true"
13-
vertical="true"
9+
exports[`CNavbar renders correctly with content 1`] = `
10+
<div
11+
class="navbar-nav"
1412
>
1513
<template>
1614
CNavbar items
1715
</template>
18-
</ul>
16+
</div>
1917
`;

src/components/index.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,6 @@ export declare class CNavbarBrand extends CLink {
401401

402402
export declare class CNavbarNav extends Vue {
403403
tag: string
404-
fill: boolean
405-
justified: boolean
406404
}
407405

408406
export declare class CNavbarToggle extends Vue {}

0 commit comments

Comments
 (0)