ant-design-blazor/components/avatar/Avatar.razor

29 lines
779 B
C#
Raw Normal View History

@namespace AntDesign
@inherits AntDomComponentBase
2019-12-17 17:53:25 +08:00
@if (Position == null || (Position == "shown" && !Overflow) || (Position == "hidden" && Overflow))
{
<span class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
@if (_hasIcon)
{
<Icon Type="@Icon" />
}
@if (_hasSrc)
{
<img src="@Src" srcset="@SrcSet" alt="@Alt" @onerror="ImgError" />
}
@if (_hasText)
{
<span class="ant-avatar-string" @ref="TextEl" style="@_textStyles">
@if (_childContent != null)
{
@_childContent
}
else
{
@_text
}
</span>
}
</span>
}