mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 00:07:07 +00:00
react-content-loader: Provides its own types (#39506)
This commit is contained in:
committed by
Jesse Trinity
parent
c223393ec0
commit
3009aa1a2c
@@ -3030,6 +3030,12 @@
|
||||
"sourceRepoURL": "https://github.com/kevinsqi/react-circular-progressbar#readme",
|
||||
"asOfVersion": "1.1.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "react-content-loader",
|
||||
"typingsPackageName": "react-content-loader",
|
||||
"sourceRepoURL": "https://github.com/danilowoz/react-content-loader",
|
||||
"asOfVersion": "4.0.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "react-day-picker",
|
||||
"typingsPackageName": "react-day-picker",
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
// Type definitions for react-content-loader 3.1
|
||||
// Project: https://github.com/danilowoz/react-content-loader
|
||||
// Definitions by: Alaa Masoud <https://github.com/alaatm>
|
||||
// Sam Walsh <https://github.com/samwalshnz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
export interface ContentLoaderProps {
|
||||
style?: React.CSSProperties;
|
||||
animate?: boolean;
|
||||
speed?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
primaryColor?: string;
|
||||
secondaryColor?: string;
|
||||
primaryOpacity?: number;
|
||||
secondaryOpacity?: number;
|
||||
preserveAspectRatio?: 'none' | 'xMinYMin meet' | 'xMidYMin meet' | 'xMaxYMin meet' | 'xMinYMid meet' | 'xMidYMid meet' | 'xMaxYMid meet' |
|
||||
'xMinYMax meet' | 'xMidYMax meet' | 'xMaxYMax meet' | 'xMinYMin slice' | 'xMidYMin slice' | 'xMaxYMin slice' | 'xMinYMid slice' |
|
||||
'xMidYMid slice' | 'xMaxYMid slice' | 'xMinYMax slice' | 'xMidYMax slice' | 'xMaxYMax slice';
|
||||
uniquekey?: string;
|
||||
className?: string;
|
||||
ariaLabel?: string;
|
||||
}
|
||||
export default class ContentLoader extends React.Component<ContentLoaderProps> { }
|
||||
export class Facebook extends React.Component<ContentLoaderProps> { }
|
||||
export class Instagram extends React.Component<ContentLoaderProps> { }
|
||||
export class Code extends React.Component<ContentLoaderProps> { }
|
||||
export class List extends React.Component<ContentLoaderProps> { }
|
||||
export class BulletList extends React.Component<ContentLoaderProps> { }
|
||||
@@ -1,35 +0,0 @@
|
||||
import * as React from 'react';
|
||||
import ContentLoader, { BulletList, Code, Facebook, Instagram, List } from 'react-content-loader';
|
||||
|
||||
const CustomComponent = () => {
|
||||
return (
|
||||
<>
|
||||
<ContentLoader
|
||||
style={{ borderBottom: '1px solid' }}
|
||||
animate={false}
|
||||
speed={1}
|
||||
height={100}
|
||||
width={100}
|
||||
primaryColor="#333"
|
||||
secondaryColor="#999"
|
||||
primaryOpacity={0.06}
|
||||
secondaryOpacity={0.12}
|
||||
preserveAspectRatio="xMinYMin meet"
|
||||
uniquekey="reactcontentloader"
|
||||
className="my-class"
|
||||
ariaLabel="loading..."
|
||||
>
|
||||
{/* Pure SVG */}
|
||||
<rect x="0" y="0" rx="5" ry="5" width="70" height="70" />
|
||||
<rect x="80" y="17" rx="4" ry="4" width="300" height="13" />
|
||||
<rect x="80" y="40" rx="3" ry="3" width="250" height="10" />
|
||||
</ContentLoader>
|
||||
|
||||
<Facebook />
|
||||
<Instagram />
|
||||
<Code />
|
||||
<List />
|
||||
<BulletList />
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-content-loader-tests.tsx"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"jsx": "react",
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user