-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.d.ts
60 lines (54 loc) · 1.59 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import * as React from 'react';
import {
ImageSourcePropType,
StyleProp,
TextInputProps,
TextStyle,
ImageStyle,
ViewStyle,
NativeSyntheticEvent,
TextInputSubmitEditingEventData
} from 'react-native';
export interface SearchBarStyle {
view?: StyleProp<ViewStyle>,
inputView?: StyleProp<ViewStyle>,
searchImage?: StyleProp<ImageStyle>,
searchInput?: StyleProp<TextStyle>,
searchEmptyTouch?: StyleProp<ViewStyle>,
searchEmptyImage?: StyleProp<ImageStyle>,
cancelTouch?: StyleProp<ViewStyle>,
cancelText?: StyleProp<TextStyle>,
}
export interface SearchBarProps {
autoFocus?: boolean,
searchText?: string,
placeholder?: string,
placeholderTextColor?: string,
canCancel?: boolean,
cancelText?: string,
canClear?: boolean,
isSearching?: boolean,
onPressCancel?: () => void,
onSubmitEditing?: (e: NativeSyntheticEvent<TextInputSubmitEditingEventData>) => void,
onChangeText?: (text?: string) => void,
textInputProps?: TextInputProps,
style?: SearchBarStyle,
}
export default class SearchBar extends React.PureComponent<SearchBarProps> {
static style: SearchBarStyle;
}
export interface FakeSearchBarStyle {
touch?: StyleProp<ViewStyle>,
image?: StyleProp<ImageStyle>,
text?: StyleProp<TextStyle>,
}
export interface FakeSearchBarProps {
placeholder?: string,
onFocus?: () => void,
image?: ImageSourcePropType,
activeOpacity?: number,
style?: FakeSearchBarStyle,
}
export class FakeSearchBar extends React.PureComponent<FakeSearchBarProps> {
static style: SearchBarStyle;
}