Comparing version 0.0.5 to 0.0.6
@@ -41,7 +41,7 @@ var React = require('react'); | ||
var diff = fnMap[this.props.type](this.props.inputA, this.props.inputB); | ||
var result = diff.map(function(part) { | ||
var result = diff.map(function(part, index) { | ||
var spanStyle = { | ||
backgroundColor: part.added ? 'lightgreen' : part.removed ? 'salmon' : 'lightgrey' | ||
} | ||
return <span style={spanStyle}>{part.value}</span> | ||
return <span key={index} style={spanStyle}>{part.value}</span> | ||
}); | ||
@@ -48,0 +48,0 @@ return ( |
{ | ||
"name": "react-diff", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Highlight differences between inputs", | ||
@@ -5,0 +5,0 @@ "main": "dist/react-diff.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3530