Commit fed11bcc authored by Lukas Eipert's avatar Lukas Eipert

Move GlIcon import from mixin to components

The vue_shared/mixins/related_issuable_mixin.js exposed a component
import to the mixin consumers. This is a bad pattern, as there is a
disconnect between templates of the components utilizing the mixin and
the components they import. This is moving the import to the actual
components.
parent 2cb69315
...@@ -2,7 +2,6 @@ import { isEmpty } from 'lodash'; ...@@ -2,7 +2,6 @@ import { isEmpty } from 'lodash';
import { sprintf, __ } from '~/locale'; import { sprintf, __ } from '~/locale';
import { formatDate } from '~/lib/utils/datetime_utility'; import { formatDate } from '~/lib/utils/datetime_utility';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import icon from '~/vue_shared/components/icon.vue';
import timeagoMixin from '~/vue_shared/mixins/timeago'; import timeagoMixin from '~/vue_shared/mixins/timeago';
const mixins = { const mixins = {
...@@ -100,9 +99,6 @@ const mixins = { ...@@ -100,9 +99,6 @@ const mixins = {
default: () => ({}), default: () => ({}),
}, },
}, },
components: {
icon,
},
directives: { directives: {
tooltip, tooltip,
}, },
......
<script> <script>
import { GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import relatedIssuableMixin from '~/vue_shared/mixins/related_issuable_mixin'; import relatedIssuableMixin from '~/vue_shared/mixins/related_issuable_mixin';
export default { export default {
name: 'IssueToken', name: 'IssueToken',
components: {
GlIcon,
},
mixins: [relatedIssuableMixin], mixins: [relatedIssuableMixin],
props: { props: {
isCondensed: { isCondensed: {
...@@ -78,7 +82,7 @@ export default { ...@@ -78,7 +82,7 @@ export default {
'issuable-info': !isCondensed, 'issuable-info': !isCondensed,
}" }"
> >
<icon <gl-icon
v-if="hasState" v-if="hasState"
v-tooltip v-tooltip
:class="iconClass" :class="iconClass"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment