insert-hover-class
v1.0.0
Published
Insert a :hover class into the DOM and return the classname
Downloads
31
Maintainers
Readme
insert-hover-class
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