UNPKG

1.09 kBJavaScriptView Raw
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = borderColor;
5var _directionalProperty = _interopRequireDefault(require("../helpers/directionalProperty"));
6function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
7/**
8 * Shorthand that accepts up to four values, including null to skip a value, and maps them to their respective directions.
9 * @example
10 * // Styles as object usage
11 * const styles = {
12 * ...borderColor('red', 'green', 'blue', 'yellow')
13 * }
14 *
15 * // styled-components usage
16 * const div = styled.div`
17 * ${borderColor('red', 'green', 'blue', 'yellow')}
18 * `
19 *
20 * // CSS as JS Output
21 *
22 * div {
23 * 'borderTopColor': 'red',
24 * 'borderRightColor': 'green',
25 * 'borderBottomColor': 'blue',
26 * 'borderLeftColor': 'yellow'
27 * }
28 */
29function borderColor() {
30 for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
31 values[_key] = arguments[_key];
32 }
33 return _directionalProperty["default"].apply(void 0, ['borderColor'].concat(values));
34}
35module.exports = exports.default;
\No newline at end of file