Skip to content

Commit e1d7eca

Browse files
author
Diego Jara
committed
v2.1.1 - Add customStyle prop
1 parent 7d106fb commit e1d7eca

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ new Vue({
101101
<td> - </td>
102102
<td> String </td>
103103
<td>Path to the avatar image to display.</td></tr>
104+
<tr><td>:customStyle</td>
105+
<td> N </td>
106+
<td> - </td>
107+
<td> Object </td>
108+
<td>A custom style object to override the base styles.</td></tr>
104109
<tr><td>backgroundColor</td>
105110
<td> N </td>
106111
<td> - </td>

documentation/_getting-started.pug

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ a(href='https://github.com/eliep/vue-avatar')
120120
td -
121121
td String
122122
td Path to the avatar image to display.
123+
tr
124+
td :customStyle
125+
td N
126+
td -
127+
td Object
128+
td A custom style object to override the base styles.
123129
tr
124130
td backgroundColor
125131
td N

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-avatar",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "Avatar component for Vue.js",
55
"author": "eprudhomme@gmail.com",
66
"license": "MIT",

src/Avatar.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="vue-avatar--wrapper" :class="customClass" :style="style">
2+
<div class="vue-avatar--wrapper" :style="[style, customStyle]">
33
<span v-if="!this.src">{{ userInitial }}</span>
44
</div>
55
</template>
@@ -21,8 +21,8 @@ export default {
2121
color: {
2222
type: String
2323
},
24-
customClass: {
25-
type: String
24+
customStyle: {
25+
type: Object
2626
},
2727
size: {
2828
type: Number,

0 commit comments

Comments
 (0)