UNPKG

1.23 kBTypeScriptView Raw
1/// <reference types="react" />
2import { CSSProperties, SVGAttributes } 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'> {
24 forwardedRef?: ((e: any) => void) | React.MutableRefObject<any> | null
25 icon: IconProp
26 mask?: IconProp
27 className?: string
28 color?: string
29 spin?: boolean
30 pulse?: boolean
31 border?: boolean
32 fixedWidth?: boolean
33 inverse?: boolean
34 listItem?: boolean
35 flip?: FlipProp
36 size?: SizeProp
37 pull?: PullProp
38 rotation?: RotateProp
39 transform?: string | Transform
40 symbol?: FaSymbol
41 style?: CSSProperties
42 tabIndex?: number;
43 title?: string;
44 swapOpacity?: boolean;
45}
46
\No newline at end of file