Prop name update, minor cleanup

This commit is contained in:
kushalpandya 2017-08-01 14:38:54 +05:30
parent 00226a9404
commit 7a70452632
1 changed files with 8 additions and 6 deletions

View File

@ -1,10 +1,12 @@
<script>
export default {
name: 'group-identicon',
props: {
id: {
entityId: {
type: Number,
required: true,
},
name: {
entityName: {
type: String,
required: true,
},
@ -24,14 +26,14 @@ export default {
'#EEEEEE',
];
const backgroundColor = allowedColors[this.id % 7];
const backgroundColor = allowedColors[this.entityId % 7];
return `background-color: ${backgroundColor}; color: #555;`;
},
identiconTitle() {
return this.name.charAt(0).toUpperCase();
}
}
return this.entityName.charAt(0).toUpperCase();
},
},
};
</script>