Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 551 Bytes

spread.md

File metadata and controls

29 lines (19 loc) · 551 Bytes

spread() Addon

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.