mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
Merge pull request #7970 from flaub/react-fa
Add definitions for react-fa
This commit is contained in:
11
react-fa/react-fa-tests.tsx
Normal file
11
react-fa/react-fa-tests.tsx
Normal 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
28
react-fa/react-fa.d.ts
vendored
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user