// Type definitions for react-fa 4.1 // Project: https://github.com/andreypopp/react-fa, http://andreypopp.github.io/react-fa // Definitions by: Frank Laub , Pat Sissons , Karol Janyst // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import { Component, ComponentClass, HTMLProps, StatelessComponent, ReactElement } from "react"; // fake intermediate interface to remove typing on size, as the typing // is overrided by react-fa interface SizeOverrideHTMLProps extends HTMLProps { size?: any; } export type IconSize = "lg" | "2x" | "3x" | "4x" | "5x"; export type IconRotation = "45" | "90" | "135" | "180" | "225" | "270" | "315"; export type IconFlip = "horizontal" | "vertical"; export type IconStackSize = "1x" | "2x"; type CustomComponent = string | ComponentClass | StatelessComponent; export interface IconProps extends SizeOverrideHTMLProps { name: string; size?: IconSize; spin?: boolean; rotate?: IconRotation; flip?: IconFlip; fixedWidth?: boolean; pulse?: boolean; stack?: IconStackSize; inverse?: boolean; Component?: CustomComponent; } export type Icon = Component; export const Icon: ComponentClass; export interface IconStackProps extends SizeOverrideHTMLProps { size?: IconSize; children?: ReactElement | Array>; } export type IconStack = Component; export const IconStack: ComponentClass; export default Icon;