mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-16 01:41:14 +08:00
49 lines
1.5 KiB
C#
49 lines
1.5 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" />
|
|
}
|
|
}
|
|
<div class="ant-alert-content">
|
|
@if (!string.IsNullOrEmpty(Message))
|
|
{
|
|
<div class="ant-alert-message">@Message</div>
|
|
}
|
|
@if (!string.IsNullOrEmpty(Description))
|
|
{
|
|
<div class="ant-alert-description">@Description</div>
|
|
}
|
|
@if (ChildContent != null)
|
|
{
|
|
<div class="ant-alert-description">@ChildContent</div>
|
|
}
|
|
</div>
|
|
@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>
|
|
}
|