@indoqa/style-system
Version:
A style system for React with Typescript typed theme support and several base components.
11 lines • 398 B
JavaScript
export const toMinMediaQuery = (breakpoint) => {
return `@media (min-width: ${breakpoint.minWidth})`;
};
export function toMediaQueryMap(breakpoints) {
const mediaQueryMap = {};
Object.keys(breakpoints).forEach((key) => {
Object.assign(mediaQueryMap, { [key]: toMinMediaQuery(breakpoints[key]) });
});
return mediaQueryMap;
}
//# sourceMappingURL=mediaQueryHelper.js.map