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

react-dynamic-font

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dynamic-font - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

demo/src/App.js

@@ -39,3 +39,3 @@ import React, { Component } from 'react';

</div>
<p styleName="tag">with sooth animate</p>
<p styleName="tag">with smooth animate</p>
<div styleName="text left">

@@ -42,0 +42,0 @@ <ReactDynamicFont smooth content={this.state.content} />

@@ -60,2 +60,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

ReactDynamicFont.prototype.componentDidMount = function componentDidMount() {
if (this.props.content && this.props.content.length) {
this.fixWidth();
}
};
ReactDynamicFont.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {

@@ -62,0 +68,0 @@ if (prevProps.content !== this.props.content && this.props.content.length) {

{
"name": "react-dynamic-font",
"version": "0.0.1",
"version": "0.0.2",
"description": "make your text does not wrap and dynamically adjust the font size",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -40,2 +40,8 @@ import React, { Component, PropTypes } from 'react';

componentDidMount() {
if(this.props.content && this.props.content.length) {
this.fixWidth();
}
}
componentDidUpdate(prevProps) {

@@ -42,0 +48,0 @@ if(prevProps.content !== this.props.content && this.props.content.length) {

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