mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 10:27:18 +02:00
21 lines
535 B
C#
21 lines
535 B
C#
using Microsoft.JSInterop;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace WotBlitzStatisticsPro.Blazor.Services
|
|
{
|
|
public class MediaQueriesService : IMediaQueriesService
|
|
{
|
|
private readonly IJSRuntime _jsRuntime;
|
|
|
|
public MediaQueriesService(IJSRuntime jsRuntime)
|
|
{
|
|
_jsRuntime = jsRuntime;
|
|
}
|
|
|
|
public ValueTask<bool> IsScreenWidthLessThen(long widthInPx)
|
|
{
|
|
return _jsRuntime.InvokeAsync<bool>("mediaQueries.IsScreenWidthLessThen", widthInPx);
|
|
}
|
|
}
|
|
}
|