react-scroll-into-view
Advanced tools
Comparing version 1.6.0 to 1.7.0
@@ -1,1 +0,1 @@ | ||
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var React=_interopDefault(require("react")),ScrollInto=function(e){var t=e.children,o=e.selector,r=e.smooth,n=void 0===r||r,l=e.style,i=void 0===l?{}:l,a=e.alignToTop,c=void 0!==a&&a,s=e.className,u=void 0===s?"":s;return React.createElement("div",{style:i,className:u,onClick:function(){var e={behavior:n?"smooth":"instant"};c&&(e.block="start",e.inline="nearest"),document.querySelector(o).scrollIntoView(e)}},t)};module.exports=ScrollInto; | ||
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var React=_interopDefault(require("react")),ScrollInto=function(e){function t(){var e={behavior:r?"smooth":"instant"};s&&(e.block="start",e.inline="nearest"),document.querySelector(n).scrollIntoView(e)}var o=e.children,n=e.selector,i=e.smooth,r=void 0===i||i,l=e.style,c=void 0===l?{}:l,a=e.alignToTop,s=void 0!==a&&a,u=e.className,f=void 0===u?"":u,d=e.onClick;return React.createElement("div",{style:c,className:f,onClick:function(e){"function"==typeof d?(d(e),setTimeout(t,1e3/60)):t()}},o)};module.exports=ScrollInto; |
{ | ||
"name": "react-scroll-into-view", | ||
"version": "1.6.0", | ||
"version": "1.7.0", | ||
"description": "Simple React element that when clicked scrolls to any element on page", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -50,2 +50,3 @@ # React scroll-into-view | ||
| className | String | | Optional class name to be applied to element | ||
| onClick| Function | | Callback fired on click | ||
@@ -52,0 +53,0 @@ ## Changelog |
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
5521
56