mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 19:30:06 +02:00
20 lines
535 B
C#
20 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);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|