Commit d8ccf4a2 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Add CSS class for UserAvatarInline rendred with GlAvatar

parent 18e28fc5
...@@ -96,11 +96,12 @@ export default { ...@@ -96,11 +96,12 @@ export default {
/> />
<gl-tooltip <gl-tooltip
v-if="tooltipText || $slots.default"
:target="() => $refs.userAvatar.$el" :target="() => $refs.userAvatar.$el"
:placement="tooltipPlacement" :placement="tooltipPlacement"
boundary="window" boundary="window"
> >
<slot> {{ tooltipText }}</slot> <slot>{{ tooltipText }}</slot>
</gl-tooltip> </gl-tooltip>
</span> </span>
</template> </template>
...@@ -100,11 +100,12 @@ export default { ...@@ -100,11 +100,12 @@ export default {
class="avatar" class="avatar"
/> />
<gl-tooltip <gl-tooltip
v-if="tooltipText || $slots.default"
:target="() => $refs.userAvatarImage" :target="() => $refs.userAvatarImage"
:placement="tooltipPlacement" :placement="tooltipPlacement"
boundary="window" boundary="window"
> >
<slot> {{ tooltipText }}</slot> <slot>{{ tooltipText }}</slot>
</gl-tooltip> </gl-tooltip>
</span> </span>
</template> </template>
<script> <script>
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { GlButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
import { sprintf, __ } from '~/locale'; import { sprintf, __ } from '~/locale';
import UserAvatarLink from './user_avatar_link.vue'; import UserAvatarLink from './user_avatar_link.vue';
...@@ -8,6 +9,7 @@ export default { ...@@ -8,6 +9,7 @@ export default {
UserAvatarLink, UserAvatarLink,
GlButton, GlButton,
}, },
mixins: [glFeatureFlagMixin()],
props: { props: {
items: { items: {
type: Array, type: Array,
...@@ -57,6 +59,9 @@ export default { ...@@ -57,6 +59,9 @@ export default {
return sprintf(__('%{count} more'), { count }); return sprintf(__('%{count} more'), { count });
}, },
imgCssClasses() {
return this.glFeatures.glAvatarForAllUserAvatars ? 'gl-mr-3' : '';
},
}, },
methods: { methods: {
expand() { expand() {
...@@ -80,6 +85,7 @@ export default { ...@@ -80,6 +85,7 @@ export default {
:img-alt="item.name" :img-alt="item.name"
:tooltip-text="item.name" :tooltip-text="item.name"
:img-size="imgSize" :img-size="imgSize"
:img-css-classes="imgCssClasses"
/> />
<template v-if="hasBreakpoint"> <template v-if="hasBreakpoint">
<gl-button v-if="hasHiddenItems" variant="link" @click="expand"> <gl-button v-if="hasHiddenItems" variant="link" @click="expand">
......
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