DefinitelyTyped/types/react-motion-loop/react-motion-loop-tests.tsx
2019-02-02 21:50:25 -05:00

17 lines
481 B
TypeScript

import * as React from "react";
import { ReactMotionLoop } from "react-motion-loop";
import { spring } from "react-motion";
const TestComponent: React.FunctionComponent<never> = props => (
<ReactMotionLoop
styleFrom={{ rotate: spring(0) }}
styleTo={{ rotate: spring(180) }}
>
{interpolatedStyle => (
<p
style={{ transform: `rotate( ${interpolatedStyle.rotate}deg)` }}
/>
)}
</ReactMotionLoop>
);