@nx-js/style-middleware
v1.0.0
Published
An NX middleware, responsible for dynamic styling.
Downloads
9
Readme
The style middleware
The style
middleware is responsible for dynamic styling.
- name: style
- middleware dependencies: attributes
- all middleware dependencies: observe, attributes
- processes: element nodes
- throws on: nothing
- use as: component or content middleware
- docs
Installation
npm install @nx-js/style-middleware
Usage
const component = require('@nx-js/core')
const observe = require('@nx-js/observe-middleware')
const attributes = require('@nx-js/attributes-middleware')
const style = require('@nx-js/style-middleware')
component()
.useOnContent(observe)
.useOnContent(attributes)
.useOnContent(style)
.register('stylish-comp')
<stylish-comp>
<div @class="{big: true, outlined: shouldOutline}"></div>
</stylish-comp>