A flexbox attribute mixin for Riot.js components.
$ npm install --save riot-md-mixin-flex
For use with other riot-md components, this mixin must be named 'flex'. See riot.mixin for more information.
const riot = require('riot');
const flex = require('riot-md-mixin-flex');
riot.mixin('flex', flex);
<md-toolbar -dflex -flex />
<!-- //=> <div class="md-toolbar" dflex flex></div> -->
<my-component -flex="2" />
<!-- //=> <div flex="2"></div> -->
See md-flex-layout to make use of these new attributes.
Appends a dflex attribute to the tag's firstElementChild.
Appends a flex attribute to the tag's firstElementChild.
Passing a value to -flex will be forwarded to the tag child's attribute.
Appends a flexrow attribute to the tag's firstElementChild.
Appends an acenter attribute to the tag's firstElementChild.
Appends a jcenter attribute to the tag's firstElementChild.
MIT © Luke Edwards