Skip to content

Commit

Permalink
fix(Avatar): placeholder (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flosciante authored Feb 11, 2022
1 parent a9f1d93 commit 1bec8d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/runtime/components/elements/Avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img v-if="url" :src="url" :alt="alt" :class="[sizeClass, roundedClass]">
<span
v-else-if="placeholder"
class="font-medium leading-none u-text-gray-900 uppercase"
class="font-medium leading-none uppercase u-text-gray-900"
>{{ placeholder }}</span>
<span
v-else-if="text"
Expand Down Expand Up @@ -77,8 +77,7 @@ export default {
if (!this.alt) {
return
}
return this.alt.split(' ').map(word => word.charAt(0)).join('')
return this.alt.split(' ').map(word => word.charAt(0)).join('').substr(0, 2)
},
sizeClass () {
return ({
Expand Down

1 comment on commit 1bec8d1

@vercel
Copy link

@vercel vercel bot commented on 1bec8d1 Feb 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

Please sign in to comment.