{"bugs":{"url":"https://github.com/robinweser/fela/issues"},"dist":{"shasum":"9cbc7217334dae38fdca4da121608b6a4c5517db","tarball":"https://registry.npmjs.org/fela-plugin-extend/-/fela-plugin-extend-11.5.0-rc.0.tgz","fileCount":5,"integrity":"sha512-PUG/7QxFLR2enW01o9UpuoG+HWqaRdLr4A9B0A/eS2jyH6zvRFfSdAiygSaOvkhR9lj28jsbKyWHdOPeZr+qTw==","signatures":[{"sig":"MEUCIQCnni448cnmFSsI2sh3yUWp4nvdS1ljEeCnmb8l09lT5AIgbtUyNmw99BiZFlpwM96ukI4ojGHuQ2bGOCzVGmBu1GA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7723,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz1SlCRA9TVsSAnZWagAA20oP/A1wNbGajxx0c/o6/fFD\n76rAVyv0Rj2rcYlCww2nXyyc0Y7F1HPSEMnoazDYadCtk2rn5uwTf8ilH3pf\nVRj4gx6/1E7qt+8EMJGoNImNdHTpdQtC3MFvUM1zJ9y4X/G3LyR5U9ZTql5r\nhtB1iwnRu/LEP5vfLnRP5dGWyHvGsfo00tZbF0LU7YavrI60OaDX0HIzobIC\nQOmgYI1wyLlRJICPycRxPPgbxDPV605Gz8WhbIIVIzVwx7AaxMlNiSjSLTT6\nX+Ek5sfBI4Zsl6BT/s1DHfyg+kHYj7xlQorUWmRSQTPg5IYVZJoSCHokFHrS\nrPpZl5BU6IK4LcPikun1iboRI+bgiFl5cWi6EJMY3i/XgAB4iGUCA8kpmV/w\nCb2icJoeU6qOXVgmK7t23Go9qxOAq/UsC1Sxw4KBLwiiC4tQuDT5GaNBBUhe\nKxyl3fLZDFdMCuGXARtNHTmK34MT/rsm2pslQekkEARvTLtqLu4peMcsWbG1\nWVQkxYM3vJZJ3oeCD66amfX1gQZYiZOd39MPucHXC7j7yRhLHsCdYzVM8J3e\na6C0RVk/uZ4zy36ctN8I1tZHjH9zpbG6ssN1S8MDUgQ7sHSouV3+a+kBrL4T\nhwroM22UfmpaoDpZNc3Q2CrP5xR89m/NUaokrAoFS/Q1CgYnPXXdFNT2acLo\nS2jR\r\n=N6Eb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","name":"fela-plugin-extend","author":{"name":"Robin Weser"},"module":"es/index.js","readme":"# fela-plugin-extend\n\n<img alt=\"npm version\" src=\"https://badge.fury.io/js/fela-plugin-extend.svg\"> <img alt=\"npm downloads\" src=\"https://img.shields.io/npm/dm/fela-plugin-extend.svg\"> <a href=\"https://bundlephobia.com/result?p=fela-plugin-extend@latest\"><img alt=\"Bundlephobia\" src=\"https://img.shields.io/bundlephobia/minzip/fela-plugin-extend.svg\"></a>\n\nAllows styles to be extended with other style objects. Supports a condition-based API.<br>\nIt automatically removes `null` and `undefined` values **before** merging styles.\n\n## Installation\n```sh\nyarn add fela-plugin-extend\n```\nYou may alternatively use `npm i --save fela-plugin-extend`.\n\n## Usage\nMake sure to read the documentation on [how to use plugins](http://fela.js.org/docs/advanced/Plugins.html).\n\n```javascript\nimport { createRenderer } from 'fela'\nimport extend from 'fela-plugin-extend'\n\nconst renderer = createRenderer({\n  plugins: [ extend() ]\n})\n```\n\n## Example\n\n### `extend: styleObject`\n#### Input\n```javascript\n{\n  color: 'red',\n  extend: { backgroundColor: 'blue' }\n}\n```\n#### Output\n```javascript\n{\n  color: 'red',\n  backgroundColor: 'blue'\n}\n```\n\n### `extend: { condition, styleObject }`\n#### Input\n```javascript\n{\n  color: 'red',\n  extend: {\n    condition: props.bg === true,\n    style: { backgroundColor: 'blue' }\n  }\n}\n```\n#### Output\nRendered using `{ bg: true }` as `props`:\n```javascript\n{\n  color: 'red',\n  backgroundColor: 'blue'\n}\n```\nRendered using `{ bg: false }` as `props`\n```javascript\n{\n  color: 'red'\n}\n```\n\n### `extend: [...]`\nYou can also mix basic and conditional extending.\nIt will extend the styles from left to right.\n```javascript\n{\n  color: 'red',\n  extend: [{\n    fontSize: '12px',\n    lineHeight: 1.5\n  }, {\n    condition: props.bg === true,\n    style: { backgroundColor: 'blue' }\n  }, {\n    lineHeight: 1.2\n  }]\n}\n```\n#### Output\nUsing `{ bg: true }` as `props`:\n```javascript\n{\n  color: 'red',\n  fontSize: '12px',\n  lineHeight: 1.2,\n  backgroundColor: 'blue'\n}\n```\n\n## License\nFela is licensed under the [MIT License](http://opensource.org/licenses/MIT).<br>\nDocumentation is licensed under [Creative Commons License](http://creativecommons.org/licenses/by/4.0/).<br>\nCreated with ♥ by [@robinweser](http://weser.io) and all the great contributors.\n","gitHead":"6d457d39e69e1471bddaea8591c50745f95070d9","license":"MIT","_npmUser":{"name":"rofrischmann","email":"robin@weser.io"},"homepage":"https://github.com/robinweser/fela#readme","keywords":["fela","fela-plugin","extend"],"repository":{"url":"git+https://github.com/robinweser/fela.git","type":"git"},"_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (darwin)","description":"Fela plugin to extend style objects","directories":{},"jsnext:main":"es/index.js","maintainers":[{"name":"rofrischmann","email":"robin@weser.io"},{"name":"txhawks","email":"tofu.hawks@gmail.com"}],"sideEffects":false,"_nodeVersion":"12.18.3","dependencies":{"isobject":"^3.0.1","fast-loops":"^1.0.0","fela-utils":"^11.5.0-rc.0","css-in-js-utils":"^3.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"fela":"^11.2.0"},"_npmOperationalInternal":{"tmp":"tmp/fela-plugin-extend_11.5.0-rc.0_1607423140946_0.06844673507185317","host":"s3://npm-registry-packages"},"_id":"fela-plugin-extend@11.5.0-rc.0","version":"11.5.0-rc.0"}