Skip to content

Commit 5868b5d

Browse files
committed
new example
1 parent 885b88d commit 5868b5d

File tree

1 file changed

+36
-25
lines changed

1 file changed

+36
-25
lines changed

Example.md

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,65 @@
11
# Example
22

3-
```javascript
4-
import React, { Component } from 'react';
5-
import { Bounce } from 'animate-components';
6-
7-
export default class App extends Component {
8-
render () {
9-
return (
10-
<div>
11-
<Bounce>
12-
<h1>Hello World!</h1>
13-
</Bounce>
14-
</div>
15-
);
16-
}
17-
}
18-
```
3+
<p align="center">
4+
<img src="https://gyazo.com/9fc95209d4a04c636b7af98711cd0df3.png" />
5+
</p>
196

207
The animation component can takes these props:
218
* **duration**
229
```javascript
23-
<Bounce duration="2s">
10+
11+
<Entrance duration="2s">
12+
2413
```
2514
* **delay**
2615
```javascript
27-
<Bounce delay="2s">
16+
17+
<Entrance delay="2s">
18+
2819
```
2920
* **timingFunction**
3021
```javascript
31-
<Bounce timingFunction="ease-in">
22+
23+
<Entrance timingFunction="ease-in">
24+
3225
```
3326
* **direction**
3427
```javascript
35-
<Bounce direction="reverse">
28+
29+
<Entrance direction="reverse">
30+
3631
```
3732
* **iterations**
3833
```javascript
39-
<Bounce iterations="2">
34+
35+
<Entrance iterations="2">
36+
4037
```
4138
* **backfaceVisible**
4239
```javascript
43-
<Bounce backfaceVisible="visible">
40+
41+
<Entrance backfaceVisible="visible">
42+
4443
```
4544
* **fillMode**
4645
```javascript
47-
<Bounce fillMode="forward">
46+
47+
<Entrance fillMode="forward">
48+
4849
```
4950
* **playState**
5051
```javascript
51-
<Bounce playState="running">
52+
53+
<Entrance playState="running">
54+
5255
```
56+
* **block**
57+
```javascript
5358

54-
All the animation components are wrapped in a high order component which renders a `<span>` with the styles derived from the **props**.
59+
<Entrance block>
60+
<h1>
61+
Hello World
62+
</h1>
63+
</Entrance>
64+
65+
```

0 commit comments

Comments
 (0)