ant-design-blazor/components/avatar/Avatar.razor
James Yeung 7b021638d9 fix: icon issues (#260)
* fix: icon issues

* fix: search suffix icon
2020-06-28 10:54:27 +08:00

26 lines
693 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
<span class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
@if (!string.IsNullOrEmpty(Icon) && _hasIcon)
{
<Icon Type="@Icon" />
}
@if (!string.IsNullOrEmpty(Src) && _hasSrc)
{
<img src="@Src" srcset="@SrcSet" alt="@Alt" @onerror="ImgError" />
}
@if (!string.IsNullOrEmpty(Text) && _hasText)
{
<span class="ant-avatar-string" @ref="TextEl" style="@_textStyles">
@Text
</span>
}
else if (ChildContent != null)
{
<span class="ant-avatar-string" @ref="TextEl" style="@_textStyles">
@ChildContent
</span>
}
</span>