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

react-scroll-into-view

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-scroll-into-view - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

2

dist/index.js

@@ -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

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