ant-design-blazor/components/avatar/Avatar.razor
Andrzej Bakun fc5086a3f7 fix(module: avatar): size calculation & CssSizeLength functionality expansion (#1364)
* core: expand CssSizeLength to handle double & decimal (with tests)

* fix(module:avatar): move to CssSizeLength

fix: explicit size calculation

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-04-16 02:50:31 +00:00

29 lines
792 B
C#

@namespace AntDesign
@inherits AntDomComponentBase
@if (Position == null || (Position == "shown" && !Overflow) || (Position == "hidden" && Overflow))
{
<span class="@ClassMapper.Class" style="@_sizeStyles @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>
}