mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[react-spinkit] Fill out props and add testcases (#14792)
* [react-spinkit] Fill out props and add testcases * Remove extraneous space * Remove another space
This commit is contained in:
parent
fda05e0cec
commit
d034203dd4
19
react-spinkit/index.d.ts
vendored
19
react-spinkit/index.d.ts
vendored
@ -1,6 +1,6 @@
|
||||
// Type definitions for react-spinkit 1.1.4
|
||||
// Project: https://github.com/KyleAMathews/react-spinkit
|
||||
// Definitions by: Qubo <https://github.com/tkqubo>, Mleko <https://github.com/mleko>
|
||||
// Definitions by: Qubo <https://github.com/tkqubo>, Mleko <https://github.com/mleko>, Tom Crockett <https://github.com/pelotom>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
@ -8,7 +8,22 @@
|
||||
|
||||
declare namespace spinner {
|
||||
export interface SpinnerProps {
|
||||
spinnerName?: string;
|
||||
/**
|
||||
* 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<SpinnerProps> {
|
||||
|
||||
@ -1,4 +1,23 @@
|
||||
import * as Spinner from 'react-spinkit';
|
||||
import * as React from 'react';
|
||||
|
||||
let spinner = <Spinner spinnerName='double-bounce' />;
|
||||
// Examples taken from http://kyleamathews.github.io/react-spinkit/
|
||||
const spinners = [
|
||||
// Basic spinners
|
||||
<Spinner spinnerName="three-bounce" />,
|
||||
<Spinner spinnerName="double-bounce" />,
|
||||
<Spinner spinnerName="rotating-plane" />,
|
||||
<Spinner spinnerName="folding-cube" />,
|
||||
<Spinner spinnerName="wave" />,
|
||||
<Spinner spinnerName="wandering-cubes" />,
|
||||
<Spinner spinnerName="pulse" />,
|
||||
<Spinner spinnerName="chasing-dots" />,
|
||||
<Spinner spinnerName="circle" />,
|
||||
<Spinner spinnerName="cube-grid" />,
|
||||
<Spinner spinnerName="wordpress" />,
|
||||
|
||||
// Spinner options
|
||||
<Spinner spinnerName="wordpress" noFadeIn />,
|
||||
<Spinner spinnerName="wordpress" overrideSpinnerClassName="my-class-to-override" />,
|
||||
<Spinner spinnerName="wordpress" className="my-class" />,
|
||||
];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user