@akveo/nga-theme
Version:
@akveo/nga-theme
35 lines (34 loc) • 988 B
TypeScript
/**
* Media breakpoint type
*
* Where `name` - breakpoint name alias (e.g. xs, sm, md, etc), and width - min breakpoint width
*/
export interface NgaMediaBreakpoint {
name: string;
width: number;
}
export declare const DEFAULT_MEDIA_BREAKPOINTS: {
name: string;
width: number;
}[];
/**
* Manages media breakpoints
*
* Provides access to available media breakpoints to convert window width to a configured breakpoint,
* e.g. 200px - *xs* breakpoint
*/
export declare class NgaMediaBreakpointsService {
private breakpoints;
constructor(breakpoints: any);
/**
* Returns a configured breakpoint by width
* @param width number
* @returns {Z|{name: string, width: number}}
*/
getBreakpoint(width: number): NgaMediaBreakpoint;
/**
* Returns a list of configured breakpoins for the theme
* @returns {{name: string, width: number}[]}
*/
getBreakpoints(): NgaMediaBreakpoint[];
}