UNPKG

1.11 kBJavaScriptView Raw
1"use strict";
2
3exports.__esModule = true;
4exports["default"] = borderStyle;
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 * ...borderStyle('solid', 'dashed', 'dotted', 'double')
13 * }
14 *
15 * // styled-components usage
16 * const div = styled.div`
17 * ${borderStyle('solid', 'dashed', 'dotted', 'double')}
18 * `
19 *
20 * // CSS as JS Output
21 *
22 * div {
23 * 'borderTopStyle': 'solid',
24 * 'borderRightStyle': 'dashed',
25 * 'borderBottomStyle': 'dotted',
26 * 'borderLeftStyle': 'double'
27 * }
28 */
29function borderStyle() {
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, ['borderStyle'].concat(values));
34}
35module.exports = exports.default;
\No newline at end of file