Skip to content

Commit 6a9786c

Browse files
committed
refactor: CHeaderBrand: delete wrappedInLink prop
1 parent 37fb9fc commit 6a9786c

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed
Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,9 @@
11
<template>
2-
<CLink v-if="wrappedInLink" v-bind="linkProps">
3-
<img
4-
class="c-header-brand"
5-
v-bind="$attrs"
6-
/>
7-
</CLink>
8-
<img
9-
v-else
10-
class="c-header-brand"
11-
v-bind="$attrs"
12-
/>
2+
<img class="c-header-brand"/>
133
</template>
144

155
<script>
16-
import CLink from '../link/CLink'
176
export default {
18-
name: 'CHeaderBrand',
19-
inheritAttrs: false,
20-
components: {
21-
CLink
22-
},
23-
props: {
24-
wrappedInLink: [String, Object]
25-
},
26-
computed : {
27-
linkProps () {
28-
return this.getObject(this.wrappedInLink, 'href')
29-
}
30-
},
31-
methods: {
32-
getObject (prop, key) {
33-
return typeof prop === 'object' ? prop : { [`${key}`]: prop }
34-
}
35-
}
7+
name: 'CHeaderBrand'
368
}
379
</script>

src/components/index.d.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,7 @@ export declare class CHeader extends Vue {
297297
withSubheader: boolean
298298
}
299299

300-
export declare class CHeaderBrand extends Vue {
301-
wrappedInLink: [object, string]
302-
}
300+
export declare class CHeaderBrand extends Vue {}
303301

304302
export declare class CHeaderNav extends Vue {}
305303

0 commit comments

Comments
 (0)