1 | import { Component } from "react";
|
2 | import { Icon, IconButtonProps, IconProps, ImageSource } from "./Icon";
|
3 |
|
4 | export const FA5Style: {
|
5 | regular: 0;
|
6 | light: 1;
|
7 | solid: 2;
|
8 | brand: 3;
|
9 | };
|
10 |
|
11 | export type ValueOf<T> = T[keyof T];
|
12 |
|
13 |
|
14 |
|
15 | export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
16 |
|
17 | export type FontAwesome5IconVariants = keyof Omit<typeof FA5Style, "regular">;
|
18 |
|
19 | export type FontAwesome5IconProps = { [K in FontAwesome5IconVariants]?: boolean } & IconProps;
|
20 |
|
21 | export class FontAwesome5IconButton extends Component<
|
22 | { [K in FontAwesome5IconVariants]?: boolean } & IconButtonProps,
|
23 | any
|
24 | > {}
|
25 |
|
26 | export default class FontAwesome5Icon extends Component<
|
27 | FontAwesome5IconProps,
|
28 | any
|
29 | > {
|
30 | static getImageSource(
|
31 | name: string,
|
32 | size?: number,
|
33 | color?: string,
|
34 | fa5Style?: ValueOf<typeof FA5Style>,
|
35 | ): Promise<ImageSource>;
|
36 | static getImageSourceSync(
|
37 | name: string,
|
38 | size?: number,
|
39 | color?: string,
|
40 | fa5Style?: ValueOf<typeof FA5Style>,
|
41 | ): ImageSource;
|
42 | static loadFont(file?: string): Promise<void>;
|
43 | static hasIcon(name: string): boolean;
|
44 | static TabBarItem: typeof Icon.TabBarItem;
|
45 | static TabBarItemIOS: typeof Icon.TabBarItemIOS;
|
46 | static Button: typeof FontAwesome5IconButton;
|
47 | }
|