<template>
  <div class="avatars">
    <router-link
      v-for="user in slicedUsers"
      :key="user.id"
      :to="userProfileLink(user)"
      class="avatars-item"
    >
      <UserAvatar
        :user="user"
        class="avatar-small"
      />
    </router-link>
  </div>
</template>

<script src="./avatar_list.js" ></script>

<style lang="scss">
@import '../../_variables.scss';

.avatars {
  display: flex;
  margin: 0;
  padding: 0;

  // For hiding overflowing elements
  flex-wrap: wrap;
  block-size: 24px;

  .avatars-item {
    margin-block: 0 5px;
    margin-inline: 5px 0;

    &:first-child {
      padding-inline-start: 5px;
    }

    .avatar-small {
      border-radius: $fallback--avatarAltRadius;
      border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
      block-size: 24px;
      inline-size: 24px;
    }
  }
}
</style>
