Skip to content

Commit 14b562b

Browse files
committed
feat: add CNavbarText component
1 parent dede5ad commit 14b562b

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

src/components/Navbar/CNavbarText.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<template>
2+
<component :is="tag" class="navbar-text">
3+
<slot></slot>
4+
</component>
5+
</template>
6+
7+
<script>
8+
export default {
9+
name: 'CNavbarText',
10+
props: {
11+
tag: {
12+
type: String,
13+
default: 'div'
14+
}
15+
}
16+
}
17+
</script>

src/components/Navbar/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import CNavbar from './CNavbar'
2-
import CNavbarNav from './CNavbarNav'
32
import CNavbarBrand from './CNavbarBrand'
3+
import CNavbarNav from './CNavbarNav'
4+
import CNavbarText from './CNavbarText'
45

56
export {
67
CNavbar,
8+
CNavbarBrand,
79
CNavbarNav,
8-
CNavbarBrand
10+
CNavbarText
911
}

src/components/index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,9 @@ export declare class CNavbar extends Vue {
408408
export declare class CNavbarBrand extends CLink {
409409
tag: string
410410
}
411+
export declare class CNavbarText extends Vue {
412+
tag: string
413+
}
411414

412415
export declare class CNavbarNav extends Vue {
413416
tag: string

0 commit comments

Comments
 (0)