ant-design-blazor/components/message/MessageItem.razor.cs
James Yeung d2e9c4b247 feat(module: config-provider): support RTL (#1238)
* feat(module: config-provider): support RTL

* add rtl for each component

* fix rtl for pagination

* add rtl for overlay
2021-03-31 19:23:26 +08:00

30 lines
718 B
C#

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