ant-design-blazor/components/message/MessageItem.razor
zxyao 042694b96f feat: add component message (#128)
* feat: add component message

* fix: then interface and demo bugs

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2020-05-19 20:08:49 +08:00

50 lines
1.8 KiB
C#

@namespace AntBlazor
@inherits MessageBase
<div class="@PrefixCls-notice @Config.AnimationClass">
<div class="@PrefixCls-notice-content">
<div class="@PrefixCls-custom-content @GetClassName()">
@{
switch (Config.Type)
{
case MessageType.Success:
{
<AntIcon Type="check-circle" Theme="fill" Class="anticon anticon-check-circle" ></AntIcon>
break;
}
case MessageType.Warning:
{
<AntIcon Type="exclamation-circle" Theme="fill" Class="anticon anticon-exclamation-circle"></AntIcon>
break;
}
case MessageType.Error:
{
<AntIcon Type="close-circle" Theme="fill" Class="anticon anticon-close-circle"></AntIcon>
break;
}
case MessageType.Info:
{
<AntIcon Type="info-circle" Theme="fill" Class="anticon anticon-info-circle"></AntIcon>
break;
}
default:
{
<AntIcon Type="loading" Theme="outline" Class="anticon anticon-loading"></AntIcon>
break;
}
}
}
<span>
@if (Config.Content.IsT0)
{
@Config.Content.AsT0;
}
else
{
@Config.Content.AsT1;
}
</span>
</div>
</div>
</div>