Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
iamyoki committed Feb 18, 2022
1 parent 1e325e4 commit 2ea9645
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
- [useSwitchTransition(state, timeout, mode)](#useswitchtransitionstate-timeout-mode)
- [Transition](#transition-1)
- [SwitchTransition](#switchtransition-1)
- [ListTransition](#listtransition)
- [Also see these amazing hooks](#also-see-these-amazing-hooks)
- [License](#license)

## Installation
Expand Down Expand Up @@ -238,6 +240,27 @@ FaCC pattern version of useSwitchTransition
| `mode` | `default` \| `out-in` \| `in-out` | **Optional**. Default to `default` mode |
| `children` | `(state: any, stage: Stage)=>React.ReactNode` | **Required**. FaCC pattern. |

### ListTransition

```jsx
<ListTransition list={list} timeout={300}>
{(item, stage)=><h1 style={...}>{item}</h1>}
</ListTransition>
```

| Props | Type | Description |
| :--------- | :------------------------------------------- | :------------------------------------------------------------ |
| `list` | `Array<any>` | **Required**. Your array state |
| `timeout` | `number` | **Required**. How long before the animation ends and unmounts |
| `children` | `(item: any, stage: Stage)=>React.ReactNode` | **Required**. FaCC pattern. |

## Also see these amazing hooks

| Repo | Intro |
| :------------------------------------------------------------------------ | :-------------------------------------------------------- |
| [🧻 infinite-scroll-hook](https:/iamyoki/infinite-scroll-hook) | Scroll down to load more never been so easy! |
| [☄️ transition-hook](https:/iamyoki/transition-hook) | An extremely light-weight react transition animation hook |

## License

[MIT](https://choosealicense.com/licenses/mit/)

0 comments on commit 2ea9645

Please sign in to comment.