1 | /**
|
2 | * @license
|
3 | * Copyright Akveo. All Rights Reserved.
|
4 | * Licensed under the MIT License. See License.txt in the project root for license information.
|
5 | */
|
6 | /**
|
7 | * Media breakpoint type
|
8 | *
|
9 | * Where `name` - breakpoint name alias (e.g. xs, sm, md, etc), and width - min breakpoint width
|
10 | */
|
11 | export interface NbMediaBreakpoint {
|
12 | name: string;
|
13 | width: number;
|
14 | }
|
15 | export declare const DEFAULT_MEDIA_BREAKPOINTS: {
|
16 | name: string;
|
17 | width: number;
|
18 | }[];
|
19 | /**
|
20 | * Manages media breakpoints
|
21 | *
|
22 | * Provides access to available media breakpoints to convert window width to a configured breakpoint,
|
23 | * e.g. 200px - *xs* breakpoint
|
24 | */
|
25 | export declare class NbMediaBreakpointsService {
|
26 | private breakpoints;
|
27 | private breakpointsMap;
|
28 | constructor(breakpoints: any);
|
29 | /**
|
30 | * Returns a configured breakpoint by width
|
31 | * @param width number
|
32 | * @returns {Z|{name: string, width: number}}
|
33 | */
|
34 | getByWidth(width: number): NbMediaBreakpoint;
|
35 | /**
|
36 | * Returns a configured breakpoint by name
|
37 | * @param name string
|
38 | * @returns NbMediaBreakpoint
|
39 | */
|
40 | getByName(name: string): NbMediaBreakpoint;
|
41 | /**
|
42 | * Returns a list of configured breakpoints for the theme
|
43 | * @returns NbMediaBreakpoint[]
|
44 | */
|
45 | getBreakpoints(): NbMediaBreakpoint[];
|
46 | /**
|
47 | * Returns a map of configured breakpoints for the theme
|
48 | * @returns {[p: string]: number}
|
49 | */
|
50 | getBreakpointsMap(): {
|
51 | [breakpoint: string]: number;
|
52 | };
|
53 | }
|