1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 |
|
7 | var _templateObject = _taggedTemplateLiteral(['\n ', '\n @media (min-width: ', ') {\n ', '\n }\n '], ['\n ', '\n @media (min-width: ', ') {\n ', '\n }\n ']);
|
8 |
|
9 | var _styledComponents = require('styled-components');
|
10 |
|
11 | var _config = require('./config');
|
12 |
|
13 | function _taggedTemplateLiteral(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | exports.default = Object.keys(_config.spacingPerBreakpoint).reduce(function (accumulator, label) {
|
27 | accumulator[label] = function () {
|
28 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
29 | args[_key] = arguments[_key];
|
30 | }
|
31 |
|
32 | return Object.keys(_config.spacingPerBreakpoint[label]).reduce(function (styledAccumulator, breakpoint) {
|
33 | return (0, _styledComponents.css)(_templateObject, styledAccumulator, _config.breakpoints[breakpoint], function () {
|
34 |
|
35 | var styles = _styledComponents.css.apply(undefined, args);
|
36 |
|
37 | return styles.map(function (style) {
|
38 | return style.replace(/{value}/g, _config.spacingPerBreakpoint[label][breakpoint]);
|
39 | });
|
40 | });
|
41 | }, {});
|
42 | };
|
43 | return accumulator;
|
44 | }, {}); |
\ | No newline at end of file |