diff --git a/types/react-wow/index.d.ts b/types/react-wow/index.d.ts new file mode 100644 index 0000000000..2773ae33d8 --- /dev/null +++ b/types/react-wow/index.d.ts @@ -0,0 +1,168 @@ +// Type definitions for react-wow 1.0 +// Project: https://github.com/skyvow/react-wow#readme +// Definitions by: Mike Thomas +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import * as React from 'react'; + +export interface ReactWOWProps { + /** + * Animation css class. + * @default animated + */ + animateClass?: string; + + /** + * Animation name. + * @see https://daneden.github.io/animate.css/ + */ + animation: + // Attention Seekers + "bounce" | + "flash" | + "pulse" | + "rubberBand" | + "shake" | + "swing" | + "tada" | + "wobble" | + "jello" | + // Bouncing Entrances + "bounceIn" | + "bounceInDown" | + "bounceInLeft" | + "bounceInRight" | + "bounceInUp" | + // Bouncing Exits + "bounceOut" | + "bounceOutDown" | + "bounceOutLeft" | + "bounceOutRight" | + "bounceOutUp" | + // Fading Entrances + "fadeIn" | + "fadeInDown" | + "fadeInDownBig" | + "fadeInLeft" | + "fadeInLeftBig" | + "fadeInRight" | + "fadeInRightBig" | + "fadeInUp" | + "fadeInUpBig" | + // Fading Exits + "fadeOut" | + "fadeOutDown" | + "fadeOutDownBig" | + "fadeOutLeft" | + "fadeOutLeftBig" | + "fadeOutRight" | + "fadeOutRightBig" | + "fadeOutUp" | + "fadeOutUpBig" | + // Flippers + "flip" | + "flipInX" | + "flipInY" | + "flipOutX" | + "flipOutY" | + // Lightspeed + "lightSpeedIn" | + "lightSpeedOut" | + // Rotating Entrances + "rotateIn" | + "rotateInDownLeft" | + "rotateInDownRight" | + "rotateInUpLeft" | + "rotateInUpRight" | + // Rotating Exits + "rotateOut" | + "rotateOutDownLeft" | + "rotateOutDownRight" | + "rotateOutUpLeft" | + "rotateOutUpRight" | + // Sliding Entrances + "slideInUp" | + "slideInDown" | + "slideInLeft" | + "slideInRight" | + // Sliding Exits + "slideOutUp" | + "slideOutDown" | + "slideOutLeft" | + "slideOutRight" | + // Zoom Entrances + "zoomIn" | + "zoomInDown" | + "zoomInLeft" | + "zoomInRight" | + "zoomInUp" | + // Zoom Exits + "zoomOut" | + "zoomOutDown" | + "zoomOutLeft" | + "zoomOutRight" | + "zoomOutUp" | + // Specials + "hinge" | + "jackInTheBox" | + "rollIn" | + "rollOut"; + + /** + * The callback is fired every time an animation is stoped. + */ + callback?: () => void; + + /** + * Content you want to apply the animation to. + */ + children: JSX.Element; + + /** + * Animation delay. + */ + delay?: string; + + /** + * Disable the animation. + * @default false + */ + disabled?: boolean; + + /** + * Animation duration. + */ + duration?: string; + + /** + * Animation iteration count. + */ + iteration?: string; + + /** + * Distance to the element when triggering the animation. + * @default 0 + */ + offset?: number | number[]; + + /** + * If your components inside a overflow container, set this to true. + * @default false + */ + overflow?: boolean; + + /** + * Listen and react to resize event. + * @default true + */ + resize?: boolean; + + /** + * Listen and react to scroll event. + * @default true + */ + scroll?: boolean; +} + +export default class ReactWOW extends React.Component {} diff --git a/types/react-wow/react-wow-tests.tsx b/types/react-wow/react-wow-tests.tsx new file mode 100644 index 0000000000..5ec30d6f48 --- /dev/null +++ b/types/react-wow/react-wow-tests.tsx @@ -0,0 +1,7 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom'; +import ReactWOW from 'react-wow'; + +const App = () => ; + +ReactDOM.render(, document.getElementById('app')); diff --git a/types/react-wow/tsconfig.json b/types/react-wow/tsconfig.json new file mode 100644 index 0000000000..4fa962168a --- /dev/null +++ b/types/react-wow/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "jsx": "react", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-wow-tests.tsx" + ] +} diff --git a/types/react-wow/tslint.json b/types/react-wow/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-wow/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }