4.1.11 • Published 6 months ago

@types/react-fa v4.1.11

Weekly downloads
671
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/react-fa

Summary

This package contains type definitions for react-fa (https://github.com/andreypopp/react-fa).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-fa.

index.d.ts

// Type definitions for react-fa 4.1
// Project: https://github.com/andreypopp/react-fa, http://andreypopp.github.io/react-fa
// Definitions by: Frank Laub <https://github.com/flaub>, Pat Sissons <https://github.com/patsissons>, Karol Janyst <https://github.com/LKay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

import { Component, ComponentClass, HTMLProps, FunctionComponent, ReactElement } from "react";

// fake intermediate interface to remove typing on size, as the typing
// is overrided by react-fa
interface SizeOverrideHTMLProps<T> extends HTMLProps<T> {
    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<any> | FunctionComponent<any>;

export interface IconProps extends SizeOverrideHTMLProps<Icon> {
    name: string;
    size?: IconSize | undefined;
    spin?: boolean | undefined;
    rotate?: IconRotation | undefined;
    flip?: IconFlip | undefined;
    fixedWidth?: boolean | undefined;
    pulse?: boolean | undefined;
    stack?: IconStackSize | undefined;
    inverse?: boolean | undefined;
    Component?: CustomComponent | undefined;
}

export type Icon = Component<IconProps>;
export const Icon: ComponentClass<IconProps>;

export interface IconStackProps extends SizeOverrideHTMLProps<IconStack> {
    size?: IconSize | undefined;
    children?: ReactElement<IconProps> | Array<ReactElement<IconProps>> | undefined;
}

export type IconStack = Component<IconStackProps>;
export const IconStack: ComponentClass<IconStackProps>;

export default Icon;

Additional Details

  • Last updated: Wed, 20 Oct 2021 21:01:40 GMT
  • Dependencies: @types/react
  • Global values: none

Credits

These definitions were written by Frank Laub, Pat Sissons, and Karol Janyst.

4.1.9

8 months ago

4.1.10

7 months ago

4.1.11

6 months ago

4.1.8

3 years ago

4.1.7

3 years ago

4.1.6

5 years ago

4.1.5

6 years ago

4.1.4

6 years ago

4.1.3

7 years ago

4.1.2

7 years ago

4.1.1

7 years ago

4.1.0

7 years ago

5.0.0

7 years ago

4.0.28

7 years ago

4.0.27

8 years ago

4.0.26

8 years ago

4.0.25-alpha

8 years ago

4.0.24-alpha

8 years ago

4.0.23-alpha

8 years ago

4.0.22-alpha

8 years ago

4.0.21-alpha

8 years ago

4.0.20-alpha

8 years ago

4.0.19-alpha

8 years ago

4.0.14-alpha

8 years ago

4.0.13-alpha

8 years ago