DefinitelyTyped/react-motion/react-motion-tests.tsx
Stepan Mikhaylyuk 6590dbdd15 Created defintions for react-motion
* started react motion definitions implementation

* added  tests

* test from repo

* updated definitions

* chenaged to tsx

* Update react-motion-tests.tsx

* Update react-motion-tests.tsx
2016-04-06 20:53:20 +09:00

18 lines
419 B
TypeScript

/// <reference path="../react/react.d.ts" />
/// <reference path="./react-motion.d.ts"/>
import * as React from 'react';
import {Motion, spring} from 'react-motion';
class Root extends React.Component<{}, {}> {
render() {
return (
<Motion defaultStyle={{ x: 0 }} style = {{ x: spring(10) }}>
{(value: any) => <div>{ value.x } </div>}
</Motion>
);
}
}