fela-combine-arrays
v1.0.9
Published
Fela enhancer to merge array values when combining rules
Downloads
36
Readme
fela-combine-arrays
Deprecated!The combine arrays enhancer is deprecated, please remove it from your Fela configuration.It is obsolete as css-in-js-utils' assignStyle now combines arrays by default.
Enables merging array values when combining rules. This is especially useful if you want to deeply merge extend arrays using fela-plugin-extend.
Installation
yarn add fela-combine-arrays
You may alternatively use npm i --save fela-combine-arrays
.
Usage
Make sure to read the documentation on how to use plugins.
import { createRenderer } from 'fela'
import combineArrays from 'fela-combine-arrays'
const renderer = createRenderer({
enhancers: [ combineArrays() ]
})
Configuration
To only merge a specific set of property values, you may pass an array of properties.
Example
import { createRenderer } from 'fela'
import combineArrays from 'fela-combine-arrays'
const combineArrayEnhancer = combineArrays(['extend'])
const renderer = createRenderer({
enhancers: [ combineArrayEnhancer ]
})
License
Fela is licensed under the MIT License. Documentation is licensed under Creative Common License. Created with ♥ by @rofrischmann and all the great contributors.