diff --git a/packages/bbui/src/Avatar/Avatar.svelte b/packages/bbui/src/Avatar/Avatar.svelte index 9a69a94834..141b7c1b37 100644 --- a/packages/bbui/src/Avatar/Avatar.svelte +++ b/packages/bbui/src/Avatar/Avatar.svelte @@ -12,7 +12,12 @@ export let size = "M" export let url = "" export let disabled = false - export let initials = "KA" + export let name = "John Doe" + + function getInitials(name) { + let parts = name.split(" ") + return parts.map((name) => name[0]).join("") + } {#if url} @@ -25,11 +30,12 @@ /> {:else}