UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

18 lines (17 loc) 617 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.makeMq = void 0; /** * Generates a media queries given a set of named breakpoints * @param {Object} breakpoints Object of key-value pairs where the key is the name of * the breakpoint size and the value is the min-width of that breakpoint * @returns {Object} A set of CSS media queries for each breakpoint size */ const makeMq = (breakpoints) => { const mq = {}; Object.keys(breakpoints).forEach(key => { mq[key] = `@media (min-width: ${breakpoints[key]}px)`; }); return mq; }; exports.makeMq = makeMq;