Skip to content

Commit

Permalink
update demo page and version
Browse files Browse the repository at this point in the history
  • Loading branch information
fluse committed Dec 5, 2019
1 parent b24728a commit f624ec8
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 12 deletions.
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ npm install react-scroll-bound --save
## Usage

```jsx

import ScrollBound from 'react-scroll-bound'

<ScrollBound>
{this.getListPoints()}
</ScrollBound>

```

Set css for element overflow scroll
Expand All @@ -40,19 +38,16 @@ Set css for element overflow scroll
default tagName is `<ul>`

```jsx

<ScrollBound tagName="div">
{this.getListPoints()}
</ScrollBound>

```

### Set properties

all attributes and properties will transmitted with `{...this.props}`

```jsx

<ScrollBound
id="name"
onWheel={onWheel}
Expand All @@ -61,7 +56,6 @@ all attributes and properties will transmitted with `{...this.props}`
>
{this.getListPoints()}
</ScrollBound>

```

## Development
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-scroll-bound",
"version": "16.12.0",
"version": "16.12.1",
"description": "prevent parent scrolling, if list scroll end reached, for better experience",
"main": "dist/scrollBound.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion page/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ h1 small {

h2 {
font-size: 30px;
padding: 0 0 5vh;
padding: 0 0 2vh;
}

h3 {
Expand All @@ -58,7 +58,7 @@ p {
padding: 20px;
max-width: 900px;
align-items: stretch;
margin: 0 auto 40vh;
margin: 0 auto 10vh;
}

.grd-2 {
Expand Down
39 changes: 37 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,24 @@ class App extends Component {
return (
<section>
<h1>
<strong>Prevent Scrolling of Parent</strong>
<small>react-list-scroll-bound</small>
<strong>Scroll-Prevention of Parent</strong>
<small>react-scroll-bound</small>
</h1>

<p>When an children reach end of scrolling, stop scrolling of parent elements</p>

<br />
<br />

<a href="https://github.com/fluse/react-list-scroll-bound" className="docu" target="_blank">Checkout Documentation</a>
<a href="https://www.npmjs.com/package/react-list-scroll-bound" className="npm" target="_blank">NPM Package</a>

<br />
<br />
<br />
<br />
<br />

<h2>Example</h2>

<div className="container">
Expand All @@ -46,6 +55,32 @@ class App extends Component {
</div>
</div>

<h2>Take a look at other Packages</h2>

<a href="https://www.npmjs.com/package/react-tab-visibility" className="npm" target="_blank">react-tab-visbility</a>

<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</section>
)
}
Expand Down

0 comments on commit f624ec8

Please sign in to comment.