1 | ;
|
2 |
|
3 | exports.__esModule = true;
|
4 | exports["default"] = backgroundImages;
|
5 | /**
|
6 | * Shorthand that accepts any number of backgroundImage values as parameters for creating a single background statement.
|
7 | * @example
|
8 | * // Styles as object usage
|
9 | * const styles = {
|
10 | * ...backgroundImages('url("/image/background.jpg")', 'linear-gradient(red, green)')
|
11 | * }
|
12 | *
|
13 | * // styled-components usage
|
14 | * const div = styled.div`
|
15 | * ${backgroundImages('url("/image/background.jpg")', 'linear-gradient(red, green)')}
|
16 | * `
|
17 | *
|
18 | * // CSS as JS Output
|
19 | *
|
20 | * div {
|
21 | * 'backgroundImage': 'url("/image/background.jpg"), linear-gradient(red, green)'
|
22 | * }
|
23 | */
|
24 | function backgroundImages() {
|
25 | for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {
|
26 | properties[_key] = arguments[_key];
|
27 | }
|
28 | return {
|
29 | backgroundImage: properties.join(', ')
|
30 | };
|
31 | }
|
32 | module.exports = exports.default; |
\ | No newline at end of file |