flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
32
VISUALIZACION/node_modules/polished/lib/shorthands/backgrounds.js
generated
vendored
Executable file
32
VISUALIZACION/node_modules/polished/lib/shorthands/backgrounds.js
generated
vendored
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports["default"] = backgrounds;
|
||||
/**
|
||||
* Shorthand that accepts any number of background values as parameters for creating a single background statement.
|
||||
* @example
|
||||
* // Styles as object usage
|
||||
* const styles = {
|
||||
* ...backgrounds('url("/image/background.jpg")', 'linear-gradient(red, green)', 'center no-repeat')
|
||||
* }
|
||||
*
|
||||
* // styled-components usage
|
||||
* const div = styled.div`
|
||||
* ${backgrounds('url("/image/background.jpg")', 'linear-gradient(red, green)', 'center no-repeat')}
|
||||
* `
|
||||
*
|
||||
* // CSS as JS Output
|
||||
*
|
||||
* div {
|
||||
* 'background': 'url("/image/background.jpg"), linear-gradient(red, green), center no-repeat'
|
||||
* }
|
||||
*/
|
||||
function backgrounds() {
|
||||
for (var _len = arguments.length, properties = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
properties[_key] = arguments[_key];
|
||||
}
|
||||
return {
|
||||
background: properties.join(', ')
|
||||
};
|
||||
}
|
||||
module.exports = exports.default;
|
||||
Loading…
Add table
Add a link
Reference in a new issue