mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-28 08:17:54 +08:00
Merge pull request #17587 from vincaslt/master
Update react-fontawesome typedefs
This commit is contained in:
55
types/react-fontawesome/index.d.ts
vendored
55
types/react-fontawesome/index.d.ts
vendored
@@ -1,35 +1,36 @@
|
||||
// Type definitions for react-fontawesome 1.5.0
|
||||
// Type definitions for react-fontawesome 1.6
|
||||
// Project: https://github.com/danawoodman/react-fontawesome
|
||||
// Definitions by: Timur Rustamov <https://github.com/timurrustamov>, Anton Kandybo <https://github.com/dublicator>
|
||||
// Definitions by: Timur Rustamov <https://github.com/timurrustamov>,
|
||||
// Anton Kandybo <https://github.com/dublicator>
|
||||
// Vincas Stonys <https://github.com/vincaslt>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
declare module "react-fontawesome" {
|
||||
import * as React from 'react';
|
||||
|
||||
import * as React from 'react';
|
||||
export = FontAwesome;
|
||||
|
||||
type FontAwesomeSize = 'lg' | '2x' | '3x' | '4x' | '5x';
|
||||
type FontAwesomeStack = "1x" | "2x";
|
||||
type FontAwesomeFlip = "horizontal" | "vertical";
|
||||
declare namespace FontAwesome {
|
||||
type FontAwesomeSize = 'lg' | '2x' | '3x' | '4x' | '5x';
|
||||
type FontAwesomeStack = "1x" | "2x";
|
||||
type FontAwesomeFlip = "horizontal" | "vertical";
|
||||
|
||||
interface FontAwesomeProps {
|
||||
ariaLabel?: string,
|
||||
border?: boolean,
|
||||
className?: string,
|
||||
cssModule?: any,
|
||||
fixedWidth?: boolean,
|
||||
flip?: FontAwesomeFlip,
|
||||
inverse?: boolean,
|
||||
name: string,
|
||||
pulse?: boolean,
|
||||
rotate?: number,
|
||||
size?: FontAwesomeSize,
|
||||
spin?: boolean,
|
||||
stack?: FontAwesomeStack,
|
||||
tag?: string
|
||||
}
|
||||
|
||||
class FontAwesome extends React.Component<FontAwesomeProps> {}
|
||||
|
||||
export = FontAwesome;
|
||||
interface FontAwesomeProps {
|
||||
ariaLabel?: string;
|
||||
border?: boolean;
|
||||
className?: string;
|
||||
cssModule?: any;
|
||||
fixedWidth?: boolean;
|
||||
flip?: FontAwesomeFlip;
|
||||
inverse?: boolean;
|
||||
name: string;
|
||||
pulse?: boolean;
|
||||
rotate?: number;
|
||||
size?: FontAwesomeSize;
|
||||
spin?: boolean;
|
||||
stack?: FontAwesomeStack;
|
||||
tag?: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare class FontAwesome extends React.Component<FontAwesome.FontAwesomeProps> {}
|
||||
|
||||
@@ -3,9 +3,7 @@ import * as ReactDOM from "react-dom";
|
||||
import FontAwesome = require('react-fontawesome');
|
||||
|
||||
class TestComponent extends React.Component {
|
||||
|
||||
render() {
|
||||
|
||||
return (
|
||||
<FontAwesome
|
||||
className='super-crazy-colors'
|
||||
|
||||
1
types/react-fontawesome/tslint.json
Normal file
1
types/react-fontawesome/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user