refactor(all): updating to newest stencil apis (#18578)

* chore(): update ionicons

* refactor(all): updating to newest stencil apis

* fix lint issues

* more changes

* moreee

* fix treeshaking

* fix config

* fix checkbox

* fix stuff

* chore(): update ionicons

* fix linting errors
This commit is contained in:
Manu MA
2019-06-23 11:26:42 +02:00
committed by GitHub
parent 78e477b2a7
commit 34dfc3ce98
112 changed files with 1229 additions and 1233 deletions

View File

@ -10,13 +10,13 @@ export const SIZE_TO_MEDIA: any = {
// Check if the window matches the media query
// at the breakpoint passed
// e.g. matchBreakpoint('sm') => true if screen width exceeds 576px
export function matchBreakpoint(win: Window, breakpoint: string | undefined) {
export function matchBreakpoint(breakpoint: string | undefined) {
if (breakpoint === undefined || breakpoint === '') {
return true;
}
if ((win as any).matchMedia) {
if ((window as any).matchMedia) {
const mediaQuery = SIZE_TO_MEDIA[breakpoint];
return win.matchMedia(mediaQuery).matches;
return window.matchMedia(mediaQuery).matches;
}
return false;
}