@reach/rect
Advanced tools
Comparing version 0.5.0 to 0.6.1
import React, { useRef, useState, useLayoutEffect } from "react"; | ||
import observeRect from "@reach/observe-rect"; | ||
import { func, bool } from "prop-types"; | ||
import PropTypes from "prop-types"; | ||
@@ -23,5 +23,5 @@ var Rect = function Rect(_ref) { | ||
Rect.propTypes = { | ||
children: func, | ||
observe: bool, | ||
onChange: func | ||
children: PropTypes.func, | ||
observe: PropTypes.bool, | ||
onChange: PropTypes.func | ||
}; | ||
@@ -28,0 +28,0 @@ } |
10
index.js
@@ -11,3 +11,3 @@ "use strict"; | ||
var _propTypes = require("prop-types"); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
@@ -18,3 +18,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
@@ -41,5 +41,5 @@ var Rect = function Rect(_ref) { | ||
Rect.propTypes = { | ||
children: _propTypes.func, | ||
observe: _propTypes.bool, | ||
onChange: _propTypes.func | ||
children: _propTypes["default"].func, | ||
observe: _propTypes["default"].bool, | ||
onChange: _propTypes["default"].func | ||
}; | ||
@@ -46,0 +46,0 @@ } |
{ | ||
"name": "@reach/rect", | ||
"version": "0.5.0", | ||
"version": "0.6.1", | ||
"description": "Measure React elements position in the DOM", | ||
@@ -28,3 +28,3 @@ "main": "index.js", | ||
], | ||
"gitHead": "7e33672d882cd6df77ac8cdb76b6b4a21dbf28c2" | ||
"gitHead": "c1e249448a3672ccc65698218f0f38ef9814ab90" | ||
} |
import React, { useRef, useState, useLayoutEffect } from "react"; | ||
import observeRect from "@reach/observe-rect"; | ||
import { func, bool } from "prop-types"; | ||
import PropTypes from "prop-types"; | ||
@@ -17,5 +17,5 @@ let Rect = ({ onChange, observe, children }) => { | ||
Rect.propTypes = { | ||
children: func, | ||
observe: bool, | ||
onChange: func | ||
children: PropTypes.func, | ||
observe: PropTypes.bool, | ||
onChange: PropTypes.func | ||
}; | ||
@@ -22,0 +22,0 @@ } |
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
9654