@skyux/core
Version:
This library was generated with [Nx](https://nx.dev).
56 lines (55 loc) • 1.83 kB
TypeScript
import { NgZone, OnDestroy } from '@angular/core';
import { Observable, Subscription } from 'rxjs';
import { SkyBreakpoint } from '../breakpoint-observer/breakpoint';
import { SkyMediaBreakpoints } from './media-breakpoints';
import { SkyMediaQueryListener } from './media-query-listener';
import * as i0 from "@angular/core";
/**
* Utility used to subscribe to viewport and container breakpoint changes.
*/
export declare class SkyMediaQueryService implements OnDestroy {
#private;
/**
* Emits when the breakpoint changes.
*/
get breakpointChange(): Observable<SkyBreakpoint>;
/**
* The size for the `xs` breakpoint.
* @default "(max-width: 767px)"
*/
static xs: string;
/**
* The size for the `sm` breakpoint.
* @default "(min-width: 768px) and (max-width: 991px)"
*/
static sm: string;
/**
* The size for the `md` breakpoint.
* @default "(min-width: 992px) and (max-width: 1199px)"
*/
static md: string;
/**
* The size for the `lg` breakpoint.
* @default "(min-width: 1200px)"
*/
static lg: string;
/**
* Returns the current breakpoint.
* @deprecated Subscribe to the `breakpointChange` observable instead.
*/
get current(): SkyMediaBreakpoints;
constructor(_zone?: NgZone);
ngOnDestroy(): void;
/**
* @internal
*/
destroy(): void;
/**
* Subscribes to screen size changes.
* @param listener Specifies a function that is called when breakpoints change.
* @deprecated Subscribe to the `breakpointChange` observable instead.
*/
subscribe(listener: SkyMediaQueryListener): Subscription;
static ɵfac: i0.ɵɵFactoryDeclaration<SkyMediaQueryService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<SkyMediaQueryService>;
}