reactify-dom-style

2.0.0 • Public • Published

reactify-dom-style

This module exports a single function which simply creates a React-compatible style object from a DOM node's computed style. The function itself has zero dependencies; if you want, you can just copy the function from the src/module/reactify-dom-style.js file and paste it into your code.

Example usage in a React render function:

var reactifyDOMStyle = require('reactify-dom-style');

...

render(){ var sourceStyle = reactifyDOMStyle(document.getElementById('someNodeId'));

return

I'm in the style of the other DOM node.
; }

...

To build the JS for demo/index.html, run the following commands in this project's root directory:

Initial Install:

'npm install'

Activate Auto-Build:

'node build'

Dependencies (1)

Dev Dependencies (3)

Package Sidebar

Install

npm i reactify-dom-style

Weekly Downloads

0

Version

2.0.0

License

MIT

Last publish

Collaborators

  • ronaldchanou