mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-15 01:11:52 +08:00
d2e9c4b247
* feat(module: config-provider): support RTL * add rtl for each component * fix rtl for pagination * add rtl for overlay
30 lines
718 B
C#
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;
|
|
}
|
|
}
|
|
}
|