1 | import * as React from "react";
|
2 | import {
|
3 | ColorValue,
|
4 | TabBarIOSItemProps,
|
5 | TextProps,
|
6 | TextStyle,
|
7 | TouchableHighlightProps,
|
8 | TouchableNativeFeedbackProps,
|
9 | ViewStyle,
|
10 | } from "react-native";
|
11 |
|
12 | export interface IconProps extends TextProps {
|
13 | |
14 |
|
15 |
|
16 |
|
17 |
|
18 | size?: number | undefined;
|
19 |
|
20 | |
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | name: string;
|
27 |
|
28 | |
29 |
|
30 |
|
31 | color?: ColorValue | number | undefined;
|
32 | }
|
33 |
|
34 | export interface IconButtonProps extends IconProps, TouchableHighlightProps, TouchableNativeFeedbackProps {
|
35 | |
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | color?: ColorValue | number | undefined;
|
42 |
|
43 | |
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | borderRadius?: number | undefined;
|
50 |
|
51 | |
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | iconStyle?: TextStyle | undefined;
|
58 |
|
59 | |
60 |
|
61 |
|
62 |
|
63 | style?: ViewStyle | TextStyle | undefined;
|
64 |
|
65 | |
66 |
|
67 |
|
68 |
|
69 |
|
70 | backgroundColor?: ColorValue | number | undefined;
|
71 | }
|
72 |
|
73 | export type ImageSource = any;
|
74 |
|
75 | export interface TabBarItemIOSProps extends TabBarIOSItemProps {
|
76 | |
77 |
|
78 |
|
79 | iconName: string;
|
80 |
|
81 | |
82 |
|
83 |
|
84 |
|
85 |
|
86 | selectedIconName?: string | undefined;
|
87 |
|
88 | |
89 |
|
90 |
|
91 |
|
92 |
|
93 | iconSize?: number | undefined;
|
94 |
|
95 | |
96 |
|
97 |
|
98 | iconColor?: ColorValue | number | undefined;
|
99 |
|
100 | |
101 |
|
102 |
|
103 |
|
104 |
|
105 | selectedIconColor?: string | undefined;
|
106 | }
|
107 |
|
108 | export class Icon extends React.Component<IconProps, any> {
|
109 | static getImageSource(
|
110 | name: string,
|
111 | size?: number,
|
112 | color?: ColorValue | number,
|
113 | ): Promise<ImageSource>;
|
114 | static getImageSourceSync(
|
115 | name: string,
|
116 | size?: number,
|
117 | color?: ColorValue | number,
|
118 | ): ImageSource;
|
119 | static getFontFamily(): string;
|
120 | static getRawGlyphMap(): { [name: string]: number };
|
121 | static loadFont(
|
122 | file?: string,
|
123 | ): Promise<void>;
|
124 | static hasIcon(
|
125 | name: string,
|
126 | ): boolean;
|
127 | }
|
128 |
|
129 | export namespace Icon {
|
130 | class TabBarItem extends React.Component<TabBarItemIOSProps, any> {}
|
131 | class TabBarItemIOS extends React.Component<TabBarItemIOSProps, any> {}
|
132 | class Button extends React.Component<IconButtonProps, any> {}
|
133 | }
|