UNPKG

norma-library

Version:

Olos/Norma-DS. Design System based on Material UI, developed with TypeScript and Styled Components to create reusable and consistent components in web applications.

12 lines 922 B
import { __makeTemplateObject } from "tslib"; import { css } from 'styled-components'; export var breakpoints = function (breakpoints) { var cssProp = breakpoints.cssProp, cssPropUnits = breakpoints.cssPropUnits, values = breakpoints.values, mediaQueryType = breakpoints.mediaQueryType; var breakpointProps = values.reduce(function (mediaQueries, value) { var _a = [Object.keys(value)[0], Object.values(value)[0]], screenBreakpoint = _a[0], cssPropBreakpoint = _a[1]; return (mediaQueries += "\n @media screen and (".concat(mediaQueryType, ": ").concat(screenBreakpoint, "px) {\n ").concat(cssProp, ": ").concat(cssPropBreakpoint).concat(cssPropUnits, ";\n }\n ")); }, ''); return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n "], ["\n ", "\n "])), breakpointProps); }; var templateObject_1; //# sourceMappingURL=styledBreakpoints.js.map