react-fittext
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -43,3 +43,3 @@ /* | ||
_onBodyResize: function() { | ||
var element = this.getDOMNode(); | ||
var element = this._childRef; | ||
var width = element.offsetWidth; | ||
@@ -51,6 +51,10 @@ element.style.fontSize = Math.max( | ||
}, | ||
_renderChildren: function(){ | ||
return React.Children.map(this.props.children, child => | ||
React.cloneElement(child,{ref:(c) => this._childRef = c}) | ||
); | ||
}, | ||
render: function() { | ||
return this.props.children; | ||
return this._renderChildren()[0]; | ||
} | ||
}); |
{ | ||
"name": "react-fittext", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "A React plugin to fit the text in the screen", | ||
@@ -54,5 +54,5 @@ "main": "lib/ReactFitText.js", | ||
}, | ||
"dependencies": { | ||
"peerDependencies": { | ||
"react": "~0.13.x" | ||
} | ||
} |
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
27041
353
- Removedreact@~0.13.x