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>

/onner/

    Package Sidebar

    Install

    npm i onner

    Weekly Downloads

    1

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    2.38 kB

    Total Files

    3

    Last publish

    Collaborators

    • pedroxam