diff --git a/types/react-spinkit/v1/index.d.ts b/types/react-spinkit/v1/index.d.ts new file mode 100644 index 0000000000..24de75a032 --- /dev/null +++ b/types/react-spinkit/v1/index.d.ts @@ -0,0 +1,34 @@ +// Type definitions for react-spinkit 1.1.4 +// Project: https://github.com/KyleAMathews/react-spinkit +// Definitions by: Qubo , Mleko , Tom Crockett +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +/// + +declare namespace spinner { + export interface SpinnerProps { + /** + * Specify spinner to use. + */ + spinnerName?: 'three-bounce' | 'double-bounce' | 'rotating-plane' | 'folding-cube' | 'wave' | 'wandering-cubes' | 'pulse' | 'chasing-dots' | 'circle' | 'cube-grid' | 'wordpress'; + /** + * Disable the initial fade-in of the spinner. + */ + noFadeIn?: boolean; + /** + * Change the default "spinner" className. + */ + overrideSpinnerClassName?: string; + /** + * Component className. + */ + className?: string; + } + + export interface Spinner extends React.ComponentClass { + } +} + +declare const spinner: spinner.Spinner; +export = spinner; diff --git a/types/react-spinkit/v1/react-spinkit-tests.tsx b/types/react-spinkit/v1/react-spinkit-tests.tsx new file mode 100644 index 0000000000..6742096ebe --- /dev/null +++ b/types/react-spinkit/v1/react-spinkit-tests.tsx @@ -0,0 +1,23 @@ +import * as Spinner from 'react-spinkit'; +import * as React from 'react'; + +// Examples taken from http://kyleamathews.github.io/react-spinkit/ +const spinners = [ + // Basic spinners + , + , + , + , + , + , + , + , + , + , + , + + // Spinner options + , + , + , +]; diff --git a/types/react-spinkit/v1/tsconfig.json b/types/react-spinkit/v1/tsconfig.json new file mode 100644 index 0000000000..e04f534c2e --- /dev/null +++ b/types/react-spinkit/v1/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../../", + "jsx": "react", + "typeRoots": [ + "../../" + ], + "types": [], + "paths": { + "react-spinkit": ["react-spinkit/v1"], + "react-spinkit/*": ["react-spinkit/v1/*"] + }, + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-spinkit-tests.tsx" + ] +} \ No newline at end of file