summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2017-10-17 15:26:09 +0200
committerTim Zallmann <tzallmann@gitlab.com>2017-10-30 10:30:15 +0100
commit6ff5e0c3a01d9870f65ff397354c9accc7c439f6 (patch)
treeee648be68254734f81184128ac12ce98354f69bb /app
parent3f3153702b982f3638f85ea9eb20a5b729258476 (diff)
downloadgitlab-ce-6ff5e0c3a01d9870f65ff397354c9accc7c439f6.tar.gz
Updated icon.vue to be more inline with other components + added spec for it
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/vue_shared/components/ci_badge_link.vue1
-rw-r--r--app/assets/javascripts/vue_shared/components/icon.vue11
2 files changed, 4 insertions, 8 deletions
diff --git a/app/assets/javascripts/vue_shared/components/ci_badge_link.vue b/app/assets/javascripts/vue_shared/components/ci_badge_link.vue
index 5b6c6e8d0b9..fc795936abf 100644
--- a/app/assets/javascripts/vue_shared/components/ci_badge_link.vue
+++ b/app/assets/javascripts/vue_shared/components/ci_badge_link.vue
@@ -43,7 +43,6 @@
computed: {
cssClass() {
const className = this.status.group;
-
return className ? `ci-status ci-${className}` : 'ci-status';
},
},
diff --git a/app/assets/javascripts/vue_shared/components/icon.vue b/app/assets/javascripts/vue_shared/components/icon.vue
index 430fab302bf..2e5f9f1088f 100644
--- a/app/assets/javascripts/vue_shared/components/icon.vue
+++ b/app/assets/javascripts/vue_shared/components/icon.vue
@@ -13,7 +13,6 @@
/>
*/
-
export default {
props: {
name: {
@@ -27,7 +26,7 @@
default: 0,
},
- cssClass: {
+ cssClasses: {
type: String,
required: false,
default: '',
@@ -38,17 +37,15 @@
spriteHref() {
return `${gon.sprite_icons}#${this.name}`;
},
- fullCssClass() {
- let classString = '' || this.cssClass;
- if (this.size) classString += `s${this.size}`;
- return classString;
+ iconSizeClass() {
+ return this.size ? `s${this.size}` : '';
},
},
};
</script>
<template>
<svg
- :class="fullCssClass">
+ :class="[iconSizeClass, cssClasses]">
<use
v-bind="{'xlink:href':spriteHref}"/>
</svg>