1 | import { Component } from "react";
|
2 | import { Icon, IconButtonProps, IconProps, ImageSource } from "./Icon";
|
3 |
|
4 | export const FA6Style: {
|
5 | regular: 0;
|
6 | light: 1;
|
7 | solid: 2;
|
8 | brand: 3;
|
9 | sharpSolid: 4;
|
10 | duotone: 5;
|
11 | thin: 6;
|
12 | };
|
13 |
|
14 | export type ValueOf<T> = T[keyof T];
|
15 |
|
16 |
|
17 |
|
18 | export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
19 |
|
20 | export type FontAwesome6IconVariants = keyof Omit<typeof FA6Style, "regular">;
|
21 |
|
22 | export type FontAwesome6IconProps = { [K in FontAwesome6IconVariants]?: boolean } & IconProps;
|
23 |
|
24 | export class FontAwesome6IconButton extends Component<
|
25 | { [K in FontAwesome6IconVariants]?: boolean } & IconButtonProps,
|
26 | any
|
27 | > {}
|
28 |
|
29 | export default class FontAwesome6Icon extends Component<FontAwesome6IconProps, any> {
|
30 | static getImageSource(
|
31 | name: string,
|
32 | size?: number,
|
33 | color?: string,
|
34 | fa6Style?: ValueOf<typeof FA6Style>,
|
35 | ): Promise<ImageSource>;
|
36 | static getImageSourceSync(
|
37 | name: string,
|
38 | size?: number,
|
39 | color?: string,
|
40 | fa6Style?: ValueOf<typeof FA6Style>,
|
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 FontAwesome6IconButton;
|
47 | }
|