ant-design-blazor/components/message/MessageItem.razor.cs
2020-05-29 00:33:49 +08:00

31 lines
701 B
C#

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Microsoft.AspNetCore.Components;
namespace AntDesign
{
public partial class MessageItem
{
[Parameter]
public MessageConfig Config { get; set; }
[Parameter]
public bool IsRtl { get; set; }
private CultureInfo _cultureInfo = new CultureInfo("en-us", false);
private string GetClassName()
{
var className = $"{PrefixCls}-{Config.Type.ToString().ToLower(_cultureInfo)}";
if (IsRtl)
{
className += " ant-message-rtl";
}
return className;
}
}
}