New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-scroll-percentage

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-scroll-percentage - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

3

lib/index.js

@@ -124,3 +124,4 @@ 'use strict';

threshold = _props.threshold,
props = _objectWithoutProperties(_props, ['children', 'threshold']);
onChange = _props.onChange,
props = _objectWithoutProperties(_props, ['children', 'threshold', 'onChange']);

@@ -127,0 +128,0 @@ return React.createElement(

{
"name": "react-scroll-percentage",
"version": "1.0.0",
"version": "1.0.1",
"description": "Monitor the scroll percentage of a component inside the viewport, using the IntersectionObserver API.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -108,3 +108,3 @@ # react-scroll-percentage

| --------- | --------- | ------- | -------- | --------------------------------------------------------------------------------------------- |
| tag | String | | false | Element tag to use for the wrapping component |
| tag | Node | | false | Element tag to use for the wrapping component |
| children | func/node | | false | Children should be either a function or a node |

@@ -119,3 +119,3 @@ | threshold | Number | 0 | false | Number between 0 and 1 indicating the the percentage that should be visible before triggering |

The basic usage pass a function as the child. It will be called whenever the
state changes, with an object containing `inView` and `percentage`.
state changes, with the current value of `percentage` and `inView`.

@@ -122,0 +122,0 @@ ```js

@@ -10,7 +10,7 @@ // @flow

/** Children should be either a function or a node */
children?: React.Node | ((percentage: number, inView: boolean) => React.Node),
children: React.Node | ((percentage: number, inView: boolean) => React.Node),
/** Call this function whenever the percentage changes */
onChange?: (percentage: number, inView: boolean) => void,
/** Number between 0 and 1 indicating the the percentage that should be visible before triggering */
threshold: number,
threshold?: number,
}

@@ -131,3 +131,3 @@

render() {
const { children, threshold, ...props } = this.props
const { children, threshold, onChange, ...props } = this.props

@@ -134,0 +134,0 @@ return (

Sorry, the diff of this file is not supported yet

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