mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-14 08:51:27 +08:00
3da9e703fa
* feat(Alert): added alert loop component * fix: move cmp into main * feat: add parameters for looping text * feat: add new messages loop * fix: create new internal looptext cmp * doc: add demo * doc: add demo markdown * doc: update alert api * doc: update cn docs * fix: add missing dependency * fix: update param name * impleement loop text with css * fix the document Co-authored-by: James Yeung <shunjiey@hotmail.com>
53 lines
1.6 KiB
C#
53 lines
1.6 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 (IsShowIcon)
|
|
{
|
|
@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 (MessageTemplate != null)
|
|
{
|
|
<div class="ant-alert-message">@MessageTemplate</div>
|
|
}
|
|
else if (!string.IsNullOrEmpty(Message))
|
|
{
|
|
<div class="ant-alert-message">@Message</div>
|
|
}
|
|
|
|
@if (ChildContent != null)
|
|
{
|
|
<div class="ant-alert-description">@ChildContent</div>
|
|
}
|
|
else if (!string.IsNullOrEmpty(Description))
|
|
{
|
|
<div class="ant-alert-description">@Description</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>
|
|
} |