mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-24 03:40:07 +02:00
feat: media query added
This commit is contained in:
1 parent
bebb5ee692
commit
d3e1e52e19
7 files changed
+45
No files matched your search
@@ -0,0 +1,20 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user