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