Skip to content

Instantly share code, notes, and snippets.

View mg901's full-sized avatar
🎯
Focusing

mg901

🎯
Focusing
View GitHub Profile
exports.createBreakpointsApi = ({ breakpoints }) => {
const breakpointsObject = Object(breakpoints);
const keys = Object.keys(breakpointsObject);
const indexMap = {};
keys.forEach((key, index) => {
indexMap[key] = index;
});
const up = (min) => breakpointsObject[min];