Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nickforddev authored Jan 10, 2021
1 parent c85faf4 commit f1beb54
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/freezeframe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,28 @@ logo.toggle(); // toggle animation
}
};
```
And in TypeScript:
```js
import { Freeze } from 'freezeframe/types';

ff.on('start', (items: Freeze[]) => {
// do something on start
};

ff.on('stop', (items: Freeze[]) => {
// do something on stop
};

ff.on('toggle', (items: Freeze[], isPlaying: boolean) => {
if (isPlaying) {
// do something on start
} else {
// do something on stop
}
};
```
- ### ```destroy()```
Expand Down

0 comments on commit f1beb54

Please sign in to comment.