1 | "use strict";
|
2 |
|
3 | exports.__esModule = true;
|
4 | exports["default"] = border;
|
5 | var _capitalizeString = _interopRequireDefault(require("../internalHelpers/_capitalizeString"));
|
6 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
7 | var sideMap = ['top', 'right', 'bottom', 'left'];
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | function border(sideKeyword) {
|
51 | for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
52 | values[_key - 1] = arguments[_key];
|
53 | }
|
54 | if (typeof sideKeyword === 'string' && sideMap.indexOf(sideKeyword) >= 0) {
|
55 | var _ref;
|
56 | return _ref = {}, _ref["border" + (0, _capitalizeString["default"])(sideKeyword) + "Width"] = values[0], _ref["border" + (0, _capitalizeString["default"])(sideKeyword) + "Style"] = values[1], _ref["border" + (0, _capitalizeString["default"])(sideKeyword) + "Color"] = values[2], _ref;
|
57 | } else {
|
58 | values.unshift(sideKeyword);
|
59 | return {
|
60 | borderWidth: values[0],
|
61 | borderStyle: values[1],
|
62 | borderColor: values[2]
|
63 | };
|
64 | }
|
65 | }
|
66 | module.exports = exports.default; |
\ | No newline at end of file |