From f318fbd33149ef0921b84657996ad31dab1e3241 Mon Sep 17 00:00:00 2001 From: Frank Laub Date: Thu, 4 Feb 2016 07:40:52 -0800 Subject: [PATCH] Add definitions for react-fa --- react-fa/react-fa-tests.tsx | 11 +++++++++++ react-fa/react-fa.d.ts | 28 ++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 react-fa/react-fa-tests.tsx create mode 100644 react-fa/react-fa.d.ts diff --git a/react-fa/react-fa-tests.tsx b/react-fa/react-fa-tests.tsx new file mode 100644 index 0000000000..778c6b16ac --- /dev/null +++ b/react-fa/react-fa-tests.tsx @@ -0,0 +1,11 @@ +/// +/// + +import * as React from "react"; +import { render } from 'react-dom'; +import Icon = require('react-fa'); + +render( + , + document.getElementById('main') +) diff --git a/react-fa/react-fa.d.ts b/react-fa/react-fa.d.ts new file mode 100644 index 0000000000..0b6b166a22 --- /dev/null +++ b/react-fa/react-fa.d.ts @@ -0,0 +1,28 @@ +// Type definitions for react-fa v4.0.0 +// Project: https://github.com/andreypopp/react-fa +// Definitions by: Frank Laub +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +/// + +declare module "react-fa" { + import { ComponentClass, Props } from 'react'; + + interface IconProps extends Props { + name: string; + className?: string; + size?: string; + spin?: boolean; + rotate?: string; + flip?: string; + fixedWidth?: boolean; + pulse?: boolean; + stack?: string; + inverse?: boolean; + } + + interface Icon extends ComponentClass { } + const Icon: Icon; + + export = Icon; +}