react-on-sticky
Advanced tools
Comparing version 0.0.5 to 0.0.6
{ | ||
"name": "react-on-sticky", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "A React implementation for position:sticky events", | ||
@@ -5,0 +5,0 @@ "author": "@ezekielaquino", |
@@ -57,2 +57,11 @@ # react-on-sticky | ||
| prop | Description | | ||
| -------------- | ------------------------------------------------------------------------------------------- | | ||
| component | string \| JSX.Element - the dom element as string to render or a JSX Element as the wrapper | | ||
| headerHeight | string \| the height of the top sentinel | | ||
| headerPosition | string \| the position of the top sentinel relative to the top of the parent | | ||
| footerHeight | string \| the height of the bottom sentinel | | ||
| footerPosition | string \| the position of the bottom sentinel relative to the bottom of the parent | | ||
| isDebug | boolean \| optional, render a visible border around the sentinels | | ||
```jsx | ||
@@ -71,3 +80,9 @@ import { useOnStickyRoot, StickyContainer } from 'react-on-sticky'; | ||
}}> | ||
<StickyContainer> | ||
<StickyContainer | ||
component="div" // string or a e.g. StyledComponent | ||
headerHeight="100px" | ||
headerPosition="0px" // from top | ||
footerHeight="2rem" | ||
footerPosition="4rem" // from bottom | ||
> | ||
</StickyContainer> | ||
@@ -74,0 +89,0 @@ </div> |
27115
149