fela-stylesheet
Organize multiple Fela Rules in StyleSheets. A simple helper to organize multiple rules within one single StyleSheet as used e.g. in React Native or react-look.
Installation
npm i --save fela-stylesheet
Assuming you are using npm as your package manager you can just npm install
.
Otherwise we also provide a UMD. You can easily use it via unpkg. It registers a FelaStyleSheet
global.
<!-- (Development) Unminified version --><script src="https://unpkg.com/fela-stylesheety@4.1.2/dist/fela-stylesheet.js"></script><!-- (Production) Minified version --><script src="https://unpkg.com/fela-stylesheet@4.1.2/dist/fela-stylesheet.min.js"></script>
API
create(styles)
Transforms a set of either style objects or rules into a set of valid rules.
Arguments
styles
(Object?): An object containing either plain style objects or valid rules.
Returns
(Object): An object containing only valid rules. It uses the same keys which were passed by styles
.
Example
const rules = const renderer = rendererrenderer
License
Fela is licensed under the MIT License.
Documentation is licensed under Creative Common License.
Created with ♥ by @rofrischmann and all the great contributors.