diff options
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_size_mixin.js')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_size_mixin.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_size_mixin.js b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_size_mixin.js new file mode 100644 index 00000000000..b6155ffd28e --- /dev/null +++ b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_size_mixin.js @@ -0,0 +1,13 @@ +export default { + computed: { + avatarSizeStylesMap() { + return { + width: `${this.size}px`, + height: `${this.size}px`, + }; + }, + avatarSizeClass() { + return `s${this.size}`; + }, + }, +}; |