spread() Addon
March 22, 2018 ยท View on GitHub
Works the same as rule() interface, but instead of returning a string of
class names, it returns an object of data attributes that can be "spread".
const rule = nano.spread({
color: 'red'
});
<div {...rule}>Hello world!</div>
Or, it can be stringified to get a class name.
const rule = nano.spread({
color: 'red'
});
<div className={rule}>Hello world!</div>
Installation
Simply install spread addon.
Read more about the Addon Installation.