UNPKG

@gameon/web

Version:
15 lines (11 loc) 257 B
export enum Breakpoint { SMALL = 480, LARGEST, } export function getCurrentBreakpoint(): Breakpoint { const currentWidth = window.innerWidth; if (currentWidth <= Breakpoint.SMALL) { return Breakpoint.SMALL; } return Breakpoint.LARGEST; }