react-within
Advanced tools
Comparing version 0.2.1 to 1.0.0
@@ -9,3 +9,3 @@ 'use strict'; | ||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; | ||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; | ||
@@ -20,4 +20,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } | ||
var _react2 = _interopRequireDefault(_react); | ||
var _reactDom = require('react-dom'); | ||
var _reactDom2 = _interopRequireDefault(_reactDom); | ||
var _within = require('within'); | ||
@@ -40,3 +42,3 @@ | ||
this.cancel = (0, _within2['default'])(_react2['default'].findDOMNode(this)); | ||
this.cancel = (0, _within2['default'])(_reactDom2['default'].findDOMNode(this)); | ||
} | ||
@@ -48,3 +50,3 @@ }, { | ||
this.cancel(); | ||
this.cancel = (0, _within2['default'])(_react2['default'].findDOMNode(this)); | ||
this.cancel = (0, _within2['default'])(_reactDom2['default'].findDOMNode(this)); | ||
} | ||
@@ -61,3 +63,3 @@ }, { | ||
return _react2['default'].createElement( | ||
return React.createElement( | ||
'div', | ||
@@ -64,0 +66,0 @@ { style: this.props.style }, |
{ | ||
"name": "react-within", | ||
"version": "0.2.1", | ||
"version": "1.0.0", | ||
"description": "React Component for fixed/sticky elements within other components", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,3 +0,4 @@ | ||
import React, {Component, PropTypes} from 'react'; | ||
import within from 'within'; | ||
import {Component, PropTypes} from 'react' | ||
import ReactDOM from 'react-dom' | ||
import within from 'within' | ||
@@ -8,11 +9,11 @@ class Within extends Component { | ||
style: PropTypes.object | ||
}; | ||
} | ||
static defaultProps = { | ||
style: {} | ||
}; | ||
} | ||
componentDidMount () { | ||
this.cancel = within(React.findDOMNode(this)); | ||
this.cancel = within(ReactDOM.findDOMNode(this)) | ||
} | ||
@@ -22,4 +23,4 @@ | ||
this.cancel(); | ||
this.cancel = within(React.findDOMNode(this)); | ||
this.cancel() | ||
this.cancel = within(ReactDOM.findDOMNode(this)) | ||
} | ||
@@ -29,3 +30,3 @@ | ||
this.cancel(); | ||
this.cancel() | ||
} | ||
@@ -35,6 +36,6 @@ | ||
return <div style={this.props.style}>{this.props.children}</div>; | ||
return <div style={this.props.style}>{this.props.children}</div> | ||
} | ||
} | ||
export default Within; | ||
export default Within |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
6595
90
0
1