ant-design-blazor/components/avatar/AntAvatar.razor
James Yeung cc9e2df41c refactor: standardized code specification (#82)
* refactor: standardized code specification

* fix: rebase conflict
2020-04-23 17:13:56 +08:00

20 lines
531 B
Plaintext

@namespace AntBlazor
@inherits AntDomComponentBase
<span class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
@if (!string.IsNullOrEmpty(Icon) && _hasIcon)
{
<AntIcon 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>
}
</span>