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

react-line-clamp

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-line-clamp - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

11

Clamp.js

@@ -28,2 +28,5 @@ 'use strict';

};
var _cancelAnimationFrame_ = typeof cancelAnimationFrame === 'function' ? cancelAnimationFrame : function (cb) {
return cb();
};

@@ -39,2 +42,3 @@ var Clamp = function (_React$Component) {

_this.adjustIntervalHandler = null;
_this.requestAnimationFrameHandler = null;

@@ -95,3 +99,3 @@

if (low <= high) {
_requestAnimationFrame_(clamp);
_this2.requestAnimationFrameHandler = _requestAnimationFrame_(clamp);
} else {

@@ -128,2 +132,3 @@ _this2.refs.context.innerHTML = _text.slice(0, mid - 1) + ellipsis;

clearInterval(this.adjustIntervalHandler);
_cancelAnimationFrame_(this.requestAnimationFrameHandler);
}

@@ -133,3 +138,2 @@ }, {

value: function render() {
console.log(this.props.children);
return _react2.default.createElement(

@@ -144,3 +148,4 @@ 'div',

'span',
{ ref: 'text', dangerouslySetInnerHTML: this.props.dangerouslySetInnerHTML },
{ ref: 'text',
dangerouslySetInnerHTML: this.props.dangerouslySetInnerHTML },
this.props.children

@@ -147,0 +152,0 @@ ),

{
"name": "react-line-clamp",
"version": "1.2.1",
"version": "1.2.2",
"description": "A react component which can help you implememt line-clamp automatically",

@@ -5,0 +5,0 @@ "main": "Clamp.js",

@@ -33,20 +33,25 @@ import React from 'react';

<Clamp className="card" style={{height: "150px"}} ellipsis={<span>&nbsp;<a href="#">Read More</a></span>} option={{}} ref="cCard">
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
<div>
<span>Brisbane’s Waterfront Place and theBrisbane’s Waterfront Place and theBrisbane’s Waterfront Place and theBrisbane’s Waterfront Place and theBrisbane’s Waterfront Place and theBrisbane’s Waterfront Place and the</span>
<div>
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
“Waterfront Place complements our ownership of 480 Queen Street in Brisbane and reinforces our role as a workspace partner for our customers.”
</div>
</div>
</Clamp>

@@ -53,0 +58,0 @@ </div>

@@ -5,2 +5,3 @@ import React from 'react';

const _requestAnimationFrame_ = typeof requestAnimationFrame === 'function' ? requestAnimationFrame : cb => cb();
const _cancelAnimationFrame_ = typeof cancelAnimationFrame === 'function' ? cancelAnimationFrame : cb => cb();

@@ -10,2 +11,3 @@ class Clamp extends React.Component {

adjustIntervalHandler = null;
requestAnimationFrameHandler = null;

@@ -59,3 +61,3 @@ constructor(props) {

if (low <= high) {
_requestAnimationFrame_(clamp);
this.requestAnimationFrameHandler = _requestAnimationFrame_(clamp);
} else {

@@ -89,10 +91,11 @@ this.refs.context.innerHTML = _text.slice(0, mid - 1) + ellipsis;

clearInterval(this.adjustIntervalHandler);
_cancelAnimationFrame_(this.requestAnimationFrameHandler);
}
render() {
console.log(this.props.children)
return <div className={this.props.className} ref="wrap" style={this.props.style}>
<div ref="context"></div>
<div ref="raw" style={{opacity: 0}}>
<span ref="text" dangerouslySetInnerHTML={this.props.dangerouslySetInnerHTML}>{this.props.children}</span>
<span ref="text"
dangerouslySetInnerHTML={this.props.dangerouslySetInnerHTML}>{this.props.children}</span>
<span ref="ellipsis">{this.props.ellipsis}</span>

@@ -99,0 +102,0 @@ </div>

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