New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.7.0 to 1.8.0-alpha0

react-scroll-into-view.d.ts

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){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;
"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;
{
"name": "react-scroll-into-view",
"version": "1.7.0",
"version": "1.8.0-alpha0",
"description": "Simple React element that when clicked scrolls to any element on page",
"main": "dist/index.js",
"files": [
"dist/index.js"
"dist/index.js",
"react-scroll-into-view.d.ts"
],

@@ -51,3 +52,4 @@ "scripts": {

"singleQuote": true
}
},
"types": "react-scroll-into-view.d.ts"
}
# React scroll-into-view
[![Build Status](https://travis-ci.org/dominikbulaj/react-scroll-into-view.svg?branch=master)](https://travis-ci.org/dominikbulaj/react-scroll-into-view)
[![npm](https://img.shields.io/npm/v/react-scroll-into-view.svg)](https://www.npmjs.com/package/react-scroll-into-view)
[![bundlephobia](https://badgen.net/bundlephobia/minzip/react-scroll-into-view)](https://bundlephobia.com/result?p=react-scroll-into-view)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
Declarative way for scrolling into view any page element
Fast & declarative way for scrolling to any element on page. Weights only ~450 B minified + gzipped

@@ -8,0 +9,0 @@ ## Idea behind

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