onner

1.0.0 • Public • Published

Onner is a tiny package for attach css class by inline style to the document head.

Installation

$ npm i onner

Usage

import o from 'onner';

Examples

	// add a style with random class name
	
    const classes = o({
      backgroundColor: '#FFF',
      position: 'relative',
      borderRadius: 10
    });
	
	<div className={classes}></div>
	
	------------------------
	
	// add a style with defined class name
	
    const classes = o({
      backgroundColor: '#FFF',
      position: 'relative',
      borderRadius: 10
    }, 'myclass');
	
	<div className={'myclass'}></div>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    0

Package Sidebar

Install

npm i onner

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.38 kB

Total Files

3

Last publish

Collaborators

  • pedroxam