diff --git a/src/Core/Components/List/FluentPersona.razor.cs b/src/Core/Components/List/FluentPersona.razor.cs index e4b8dd50a1..dc14c917ce 100644 --- a/src/Core/Components/List/FluentPersona.razor.cs +++ b/src/Core/Components/List/FluentPersona.razor.cs @@ -94,14 +94,17 @@ public partial class FluentPersona : FluentComponentBase public string? DismissTitle { get; set; } /// - private string GetDefaultInitials() + private string GetDefaultInitials() => GetDefaultInitials(Name); + + /// + internal static string GetDefaultInitials(string? name) { - if (string.IsNullOrEmpty(Name)) + if (string.IsNullOrEmpty(name)) { return string.Empty; } - var parts = Name.ToUpper().Split(' ', StringSplitOptions.RemoveEmptyEntries); + var parts = name.ToUpper().Split(' ', StringSplitOptions.RemoveEmptyEntries); return parts == null || parts.Length == 0 || (parts.Length == 1 && parts[0] == string.Empty) diff --git a/src/Core/Components/ProfileMenu/FluentProfileMenu.razor b/src/Core/Components/ProfileMenu/FluentProfileMenu.razor index f31134714e..5d3cfd050e 100644 --- a/src/Core/Components/ProfileMenu/FluentProfileMenu.razor +++ b/src/Core/Components/ProfileMenu/FluentProfileMenu.razor @@ -48,8 +48,8 @@ + Initials="@(Initials ?? FluentPersona.GetDefaultInitials(FullName))" + Style="align-items: normal; font-size: x-large;"> @FullName @EMail diff --git a/tests/Core/ProfileMenu/FluentProfileMenuTests.FluentProfileMenu_Default.verified.razor.html b/tests/Core/ProfileMenu/FluentProfileMenuTests.FluentProfileMenu_Default.verified.razor.html index 87653e0b17..cd7cd1890f 100644 --- a/tests/Core/ProfileMenu/FluentProfileMenuTests.FluentProfileMenu_Default.verified.razor.html +++ b/tests/Core/ProfileMenu/FluentProfileMenuTests.FluentProfileMenu_Default.verified.razor.html @@ -31,7 +31,7 @@
-
+