Use Unicode aware character-wise slicing (#159)

This commit is contained in:
Samuel Dionne-Riel authored and GitHub committed 2021-11-10 13:30:25 +05:30
1 parent d46d1fde6b
commit 84380fedf6
10 files changed
+11 -11

No files matched your search

@@ -18,7 +18,7 @@ function PeopleSelector({
onClick={onClick}
type="button"
>
<Avatar imageSrc={avatarSrc} text={name.slice(0, 1)} bgColor={color} size="extra-small" />
<Avatar imageSrc={avatarSrc} text={name} bgColor={color} size="extra-small" />
<Text className="people-selector__name" variant="b1">{name}</Text>
{peopleRole !== null && <Text className="people-selector__role" variant="b3">{peopleRole}</Text>}
</button>