mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Create Type definitions for react-wow
This commit is contained in:
168
types/react-wow/index.d.ts
vendored
Normal file
168
types/react-wow/index.d.ts
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
// Type definitions for react-wow 1.0
|
||||
// Project: https://github.com/skyvow/react-wow#readme
|
||||
// Definitions by: Mike Thomas <https://github.com/mikepthomas>
|
||||
// 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<ReactWOWProps> {}
|
||||
7
types/react-wow/react-wow-tests.tsx
Normal file
7
types/react-wow/react-wow-tests.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import * as ReactDOM from 'react-dom';
|
||||
import ReactWOW from 'react-wow';
|
||||
|
||||
const App = () => <ReactWOW animation='fadeIn'><img src='https://unsplash.it/900/900/?random' /></ReactWOW>;
|
||||
|
||||
ReactDOM.render(<App/>, document.getElementById('app'));
|
||||
25
types/react-wow/tsconfig.json
Normal file
25
types/react-wow/tsconfig.json
Normal file
@@ -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"
|
||||
]
|
||||
}
|
||||
1
types/react-wow/tslint.json
Normal file
1
types/react-wow/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user