Merge pull request #7970 from flaub/react-fa

Add definitions for react-fa
This commit is contained in:
Masahiro Wakame
2016-02-07 01:45:07 +09:00
2 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
/// <reference path="react-fa.d.ts"/>
/// <reference path="../react/react-dom.d.ts"/>
import * as React from "react";
import { render } from 'react-dom';
import Icon = require('react-fa');
render(
<Icon spin name="spinner" />,
document.getElementById('main')
)

28
react-fa/react-fa.d.ts vendored Normal file
View File

@@ -0,0 +1,28 @@
// Type definitions for react-fa v4.0.0
// Project: https://github.com/andreypopp/react-fa
// Definitions by: Frank Laub <https://github.com/flaub>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../react/react.d.ts" />
declare module "react-fa" {
import { ComponentClass, Props } from 'react';
interface IconProps extends Props<Icon> {
name: string;
className?: string;
size?: string;
spin?: boolean;
rotate?: string;
flip?: string;
fixedWidth?: boolean;
pulse?: boolean;
stack?: string;
inverse?: boolean;
}
interface Icon extends ComponentClass<IconProps> { }
const Icon: Icon;
export = Icon;
}