npm

npm’s 2019 JavaScript ecosystem survey analysis is now available! Get your copy here »

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

27

version

1.0.0

license

MIT

last publish

collaborators

  • avatar
Report a vulnerability