Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-fittext

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-fittext - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

10

lib/ReactFitText.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc