insert-hover-class

    1.0.0 • Public • Published

    insert-hover-class npm version Build Status

    Create and insert a :hover class into the DOM and return the classname

    To Install

    $ npm install --save insert-hover-class
    

    Usage

    var insertHC = require('insert-hover-class')
     
    var hoverClassname = insertHC({
      color: 'red',
      'font-weight': '700'
    })
     
    console.log(hoverClassname)
    // 'cih3lymsf0000wly8uizhbo6d'

    virtual-dom example

    var insertHC = require('insert-hover-class')
    var h = require('virtual-dom/h')
     
    var redBoldHoverClass = insertHC({/* hover object */})
     
    h('label', {
      className: redBoldHoverClass
    }, 'I get big and red when you hover over me!')

    API

    insertHC(hoverObject[, classname]) -> string

    hoverObject

    See create-hover-class's definition'

    [classname]

    See create-hover-class's definition

    See Also

    License

    MIT

    Install

    npm i insert-hover-class

    DownloadsWeekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • chinedufn