Skip to content

Commit

Permalink
v2.1.1 - Add customStyle prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Jara committed Nov 15, 2017
1 parent 7d106fb commit e1d7eca
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ new Vue({
<td> - </td>
<td> String </td>
<td>Path to the avatar image to display.</td></tr>
<tr><td>:customStyle</td>
<td> N </td>
<td> - </td>
<td> Object </td>
<td>A custom style object to override the base styles.</td></tr>
<tr><td>backgroundColor</td>
<td> N </td>
<td> - </td>
Expand Down
6 changes: 6 additions & 0 deletions documentation/_getting-started.pug
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ a(href='https://github.com/eliep/vue-avatar')
td -
td String
td Path to the avatar image to display.
tr
td :customStyle
td N
td -
td Object
td A custom style object to override the base styles.
tr
td backgroundColor
td N
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-avatar",
"version": "2.1.0",
"version": "2.1.1",
"description": "Avatar component for Vue.js",
"author": "[email protected]",
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions src/Avatar.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="vue-avatar--wrapper" :class="customClass" :style="style">
<div class="vue-avatar--wrapper" :style="[style, customStyle]">
<span v-if="!this.src">{{ userInitial }}</span>
</div>
</template>
Expand All @@ -21,8 +21,8 @@ export default {
color: {
type: String
},
customClass: {
type: String
customStyle: {
type: Object
},
size: {
type: Number,
Expand Down

0 comments on commit e1d7eca

Please sign in to comment.