Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit 96c9ea1

Browse files
author
Brandon Dail
committed
Copy updates for demo/README
1 parent d966a7e commit 96c9ea1

File tree

6 files changed

+26
-20
lines changed

6 files changed

+26
-20
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# react-effects
1+
# react-animations
22

33

4-
A collection of animations for CSS-in-JS libraries. react-effects implements all animations from [animate.css](https://daneden.github.io/animate.css/), allowing you to use them in any project that uses JavaScript for style management.
4+
A collection of animations for CSS-in-JS libraries. react-animations implements all animations from [animate.css](https://daneden.github.io/animate.css/), allowing you to use them in any project that uses JavaScript for style management.
55
### Usage
66

7-
These animations can be used with Radium, Aphordite, or any other CSS-in-JS library--with or without React. Just import the animation from the package
7+
These animations can be used with Radium, Aphordite, or any other CSS-in-JS library that supports using objects to define keyframes. Just import the animation from the package
88
and include it in your style definition. Below are some examples using a few
99
popular styling libraries.
1010

1111

1212
### Radium
1313

1414
```js
15-
import { bounce } from 'react-effects';
15+
import { bounce } from 'react-animations';
1616
import Radium from 'radium';
1717

1818
const styles = {
@@ -26,7 +26,7 @@ const styles = {
2626
### Aphrodite
2727

2828
```js
29-
import { bounce } from 'react-effects';
29+
import { bounce } from 'react-animations';
3030
import { StyleSheet, css } from 'aphrodite';
3131

3232
const styles = StyleSheet.create({
@@ -120,11 +120,11 @@ Below is a list of all available animations
120120

121121
## Merge
122122

123-
react-effects also exports a `merge` function that takes two animations and returns a new animation that combines the transforms from both. This is experimental and wont work (well) with animations that have conflicting transforms, such as `fadeIn` and `fadeOut`.
123+
react-animations also exports a `merge` function that takes two animations and returns a new animation that combines the transforms from both. This is experimental and wont work (well) with animations that have conflicting transforms, such as `fadeIn` and `fadeOut`. The merged animation can be used just like any of the imported animations.
124124

125125

126126
```js
127127

128-
import { merge, tada, flip } from 'react-effects';
128+
import { merge, tada, flip } from 'react-animations';
129129
const tadaFlip = merge(tada, flip);
130130
```

demo/app.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ const styles = {
2121
transform: 'translate3d(0, 0, 0)',
2222
},
2323
p: {
24-
margin: 0
24+
margin: 0,
25+
color: '#242121'
2526
},
2627
select: {
28+
backgroundColor: '#e7e5e3',
2729
border: 'none',
2830
height: 35,
2931
fontSize: 15,
@@ -32,13 +34,15 @@ const styles = {
3234
fontWeight: 'bold',
3335
},
3436
input: {
37+
backgroundColor: '#e7e5e3',
3538
height: 35,
3639
border: 'none',
3740
padding: '0px 5px',
3841
borderRadius: 6,
3942
fontFamily: 'inherit'
4043
},
4144
button: {
45+
backgroundColor: '#e7e5e3',
4246
outline: 'none',
4347
backgroundColor: 'white',
4448
height: 35,

demo/description.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,26 @@ const Demo = ({ styles, duration, animation }) => {
1010
width: 500,
1111
fontSize: 60,
1212
margin: '30px auto',
13+
color: '#c43a31'
1314
};
1415
const descriptionStyle = {
1516
...styles.fadeInUp,
1617
animationDuration: '2s',
1718
fontSize: 16,
1819
}
1920

20-
// I'm so sorry.
21+
// Render a bunch of empty spans so that each keyframe
22+
// will be available in the DOM.
2123
let dummies = Object.keys(styles).map(
2224
key => <span key={key} style={styles[key]} />
2325
);
2426

2527
return (
2628
<div>
2729
{dummies}
28-
<h1 key={animation} style={headerStyle}>react-effects</h1>
29-
<span style={descriptionStyle}>A collection of animations for CSS-in-JS libraries </span>
30+
<h1 key={animation} style={headerStyle}>react-animations</h1>
31+
<p style={descriptionStyle}>A collection of animations for CSS-in-JS libraries </p>
32+
<a href='https://github.com/FormidableLabs/react-animations'>View on Github</a>
3033
</div>
3134
)
3235
}

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
2-
"name": "react-effects",
3-
"version": "0.1.0",
4-
"description": "animation library for Radium",
5-
"main": "index.js",
2+
"name": "react-animations",
3+
"version": "0.0.1",
4+
"description": "A collection of animations for inline styles",
5+
"main": "lib/index.js",
66
"scripts": {
77
"flow": "flow",
88
"test": "jest",
99
"build": "builder run build",
10+
"prepublish": "npm run build",
1011
"demo": "npm run build && builder run hot"
1112
},
1213
"keywords": [
@@ -25,6 +26,7 @@
2526
"radium": "^0.18.1"
2627
},
2728
"dependencies": {
29+
"builder": "^3.0.0",
2830
"builder-radium-component": "^2.1.2",
2931
"builder-victory-component": "^2.5.0"
3032
}

src/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/* Utilities */
2-
export merge from './merge';
3-
41
/* Attention seekers */
52
export bounce from './components/bounce';
63
export flash from './components/flash';
@@ -20,7 +17,7 @@ export bounceInLeft from './components/bounceInLeft';
2017
export bounceInRight from './components/bounceInRight';
2118
export bounceInUp from './components/bounceInUp';
2219

23-
/* Bouncing exits */
20+
/* Bouncing exits */
2421
export bounceOut from './components/bouceOut';
2522
export bounceOutDown from './components/bounceOutDown';
2623
export bounceOutLeft from './components/bounceOutLeft';

src/merge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const defaultNormalizedFrames: FrameMap = {
2626
* that are clearly opposites (fadeIn and fadeOut).
2727
*
2828
* @example
29-
* import { merge, tada, flip } from 'react-effects';
29+
* import { merge, tada, flip } from 'react-animations';
3030
* const tadaFlip = merge(tada, flip);
3131
*/
3232
export default function merge(

0 commit comments

Comments
 (0)