mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
add types for react-icofont npm package (#38327)
This commit is contained in:
parent
68721e9fb7
commit
adc769c638
18
types/react-icofont/index.d.ts
vendored
Normal file
18
types/react-icofont/index.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
// Type definitions for react-icofont 1.0
|
||||
// Project: https://www.npmjs.com/package/react-icofont
|
||||
// Definitions by: Ivan Chuyko <https://github.com/ichuyko>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
export interface IcofontProps {
|
||||
icon: string;
|
||||
spin?: boolean;
|
||||
flip?: "h" | "v";
|
||||
rotate?: "90" | "180" | "270";
|
||||
size?: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10";
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default class Icofont extends React.Component<IcofontProps> {}
|
||||
10
types/react-icofont/react-icofont-tests.tsx
Normal file
10
types/react-icofont/react-icofont-tests.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import Icofont from "react-icofont";
|
||||
|
||||
class Test extends React.Component<any> {
|
||||
render() {
|
||||
return (
|
||||
<Icofont icon="spinner-alt-4" size="3" spin={true}/>
|
||||
);
|
||||
}
|
||||
}
|
||||
25
types/react-icofont/tsconfig.json
Normal file
25
types/react-icofont/tsconfig.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"jsx": "react",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-icofont-tests.tsx"
|
||||
]
|
||||
}
|
||||
3
types/react-icofont/tslint.json
Normal file
3
types/react-icofont/tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user