add avatar to kit

This commit is contained in:
kandrusyak
2022-10-27 18:25:03 +03:00
parent 444f144d33
commit 3869a64888
4 changed files with 69 additions and 6 deletions

View File

@@ -0,0 +1,53 @@
<template lang="pug">
.base-avatar(:style="styles")
slot
</template>
<script>
export default {
name: "BaseAvatar",
props: {
size: {
type: Number,
size: 32,
},
color: {
type: String,
default: "#D3D4DC",
},
},
computed: {
styles() {
return {
width: this.size + "px",
height: this.size + "px",
minWidth: this.size + "px",
backgroundColor: this.color,
};
},
},
};
</script>
<style scoped lang="sass">
.base-avatar
align-items: center
border-radius: 50%
display: inline-flex
justify-content: center
line-height: normal
position: relative
text-align: center
vertical-align: middle
overflow: hidden
color: var(--font-dark-blue-color)
text-transform: uppercase
img,
svg
border-radius: inherit
display: inline-flex
height: inherit
width: inherit
</style>