Skip to content

Commit

Permalink
Release new version
Browse files Browse the repository at this point in the history
  • Loading branch information
roderickhsiao committed Apr 3, 2023
1 parent ba32ebe commit 112bb38
Show file tree
Hide file tree
Showing 3 changed files with 1,945 additions and 2,344 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ _NOTE_: Stateless: Need to add `ref={this.props.forwardedRef}` to your component
#### Example of a functional component

```tsx
import handleViewport, { type InjectedProps } from 'react-in-viewport';
import handleViewport, { type InjectedViewportProps } from 'react-in-viewport';

const Block = (props: InjectedProps<HTMLDivElement>) => {
const Block = (props: InjectedViewportProps<HTMLDivElement>) => {
const { inViewport, forwardedRef } = props;
const color = inViewport ? '#217ac0' : '#ff9800';
const text = inViewport ? 'In viewport' : 'Not in viewport';
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-in-viewport",
"version": "1.0.0-alpha.29",
"version": "1.0.0-alpha.30",
"description": "Track React component in viewport using Intersection Observer API",
"author": "Roderick Hsiao <roderickhsiao@gmail.com>",
"license": "MIT",
Expand Down Expand Up @@ -36,12 +36,12 @@
"@babel/preset-env": "^7.3.1",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.16.7",
"@storybook/addon-actions": "^7.0.0-beta.24",
"@storybook/addon-docs": "^7.0.0-beta.24",
"@storybook/addon-essentials": "^7.0.0-beta.24",
"@storybook/react": "^7.0.0-beta.24",
"@storybook/react-webpack5": "^7.0.0-beta.24",
"@testing-library/react": "^13.0.0",
"@storybook/addon-actions": "^7.0.0",
"@storybook/addon-docs": "^7.0.0",
"@storybook/addon-essentials": "^7.0.0",
"@storybook/react": "^7.0.0",
"@storybook/react-webpack5": "^7.0.0",
"@testing-library/react": "^14.0.0",
"@types/hoist-non-react-statics": "^3.3.1",
"@types/jest": "^29.0.0",
"@types/react-test-renderer": "^18.0.0",
Expand Down Expand Up @@ -70,8 +70,8 @@
"react-aspect-ratio": "^1.0.3",
"react-dom": "^18.0.0",
"react-test-renderer": "^18.0.0",
"storybook": "^7.0.0-beta.24",
"typescript": "^4.3.2",
"storybook": "^7.0.0",
"typescript": "^5.0.0",
"webpack": "^5.75.0"
},
"peerDependencies": {
Expand Down

0 comments on commit 112bb38

Please sign in to comment.