gitlab-org--gitlab-foss/app/assets/javascripts/breakpoints.js
2017-08-10 14:02:30 +01:00

19 lines
375 B
JavaScript

export const breakpoints = {
lg: 1200,
md: 992,
sm: 768,
xs: 0,
};
const BreakpointInstance = {
windowWidth: () => window.innerWidth,
getBreakpointSize() {
const windowWidth = this.windowWidth();
const breakpoint = Object.keys(breakpoints).find(key => windowWidth > breakpoints[key]);
return breakpoint;
},
};
export default BreakpointInstance;