UNPKG

1.37 kBTypeScriptView Raw
1/// <reference types="react" />
2import { CSSProperties, SVGAttributes, RefAttributes } from 'react'
3import {
4 Transform,
5 IconProp,
6 FlipProp,
7 SizeProp,
8 PullProp,
9 RotateProp,
10 FaSymbol
11} from '@fortawesome/fontawesome-svg-core'
12
13export function FontAwesomeIcon(props: FontAwesomeIconProps): JSX.Element
14
15/**
16 * @deprecated use FontAwesomeIconProps
17 */
18export type Props = FontAwesomeIconProps
19
20// This is identical to the version of Omit in Typescript 3.5. It is included for compatibility with older versions of Typescript.
21type BackwardCompatibleOmit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
22
23export interface FontAwesomeIconProps extends BackwardCompatibleOmit<SVGAttributes<SVGSVGElement>, 'children' | 'mask' | 'transform'>, RefAttributes<SVGSVGElement> {
24 icon: IconProp
25 mask?: IconProp
26 maskId?: string
27 className?: string
28 color?: string
29 spin?: boolean
30 spinPulse?: boolean
31 spinReverse?: boolean
32 pulse?: boolean
33 beat?: boolean
34 fade?: boolean
35 beatFade?: boolean
36 bounce?: boolean
37 shake?: boolean
38 border?: boolean
39 fixedWidth?: boolean
40 inverse?: boolean
41 listItem?: boolean
42 flip?: FlipProp
43 size?: SizeProp
44 pull?: PullProp
45 rotation?: RotateProp
46 transform?: string | Transform
47 symbol?: FaSymbol
48 style?: CSSProperties
49 tabIndex?: number;
50 title?: string;
51 titleId?: string;
52 swapOpacity?: boolean;
53}