ant-design-blazor/components/alert/Alert.razor
James Yeung 9b0f95ef3a fix(module: alert): close motion 'Smoothly Unmount' (#502)
* fix(module: alert): close motion

* fix: add de
2020-08-13 16:04:58 +08:00

47 lines
1.4 KiB
C#

@namespace AntDesign
@inherits AntDomComponentBase
@if (!_isClosed)
{
<div data-show="@(!_isClosing||_isClosed?"true":"false")" class="@ClassMapper.Class" style="@_innerStyle @Style " Id="@Id" @ref="Ref">
@if (ShowIcon)
{
@if (Icon!=null)
{
<div class="ant-alert-icon">
@Icon
</div>
}
else
{
<Icon Type="@IconType" Theme="@(string.IsNullOrWhiteSpace(Description)?"fill":"outline")" Class="ant-alert-icon" />
}
}
@if (!string.IsNullOrEmpty(Message))
{
<span class="ant-alert-message">@Message</span>
}
@if (!string.IsNullOrEmpty(Description))
{
<span class="ant-alert-description">@Description</span>
}
@if (ChildContent != null)
{
<span class="ant-alert-description">@ChildContent</span>
}
@if (Closable)
{
<button type="button" class="ant-alert-close-icon" tabindex="0" @onclick="@OnCloseHandler">
@if (!string.IsNullOrEmpty(CloseText))
{
<span class="ant-alert-close-text">@CloseText</span>
}
else
{
<Icon Type="close"/>
}
</button>
}
</div>
}