ant-design-blazor/components/avatar/Avatar.razor
Henry.zhang f9b615c2ca feat: add more demos (#197)
...for affix,back-top,breadcrumb,card,divider,typogragpy and timeline

Co-authored-by: ElderJames <shunjiey@hotmail.com>
2020-06-07 19:41:00 +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>