button-avatar.vue 621 Bytes
<template>
  <ImageFormat class="img-avatar" :style="avatarStyle" :src="src" :width="width" :height="height"></ImageFormat>
</template>

<script>
export default {
  name: 'ButtonAvatar',
  props: {
    src: {
      type: String,
      default: ''
    },
    width: {
      type: Number,
      default: 35
    },
    height: {
      type: Number,
      default: 35
    }
  },
  computed: {
    avatarStyle() {
      return {
        width: `${this.width}px`,
        height: `${this.height}px`,
      };
    }
  }
};
</script>

<style lang="scss" scoped>
.img-avatar {
  border-radius: 50%;
  overflow: hidden;
}
</style>