mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-14 00:41:30 +08:00
822ce2dd36
* feat: add themes * add docs theming styles * fix the RTL for FixedWidgets * fix aliyun theme * fix docs style
28 lines
647 B
C#
28 lines
647 B
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.JSInterop;
|
|
|
|
namespace AntDesign
|
|
{
|
|
public class ConfigService
|
|
{
|
|
private IJSRuntime _jS;
|
|
|
|
public ConfigService(IJSRuntime js)
|
|
{
|
|
_jS = js;
|
|
}
|
|
|
|
public async Task ChangeDirection(string direction)
|
|
{
|
|
direction = direction?.ToLowerInvariant();
|
|
await _jS.InvokeVoidAsync(JSInteropConstants.SetDomAttribute, "html", new Dictionary<string, string>
|
|
{
|
|
["class"] = direction,
|
|
["data-direction"] = direction
|
|
});
|
|
|
|
}
|
|
}
|
|
}
|