UNPKG

1.07 kBTypeScriptView Raw
1import React from 'react';
2import { TextInput, TextInputProps } from 'react-native';
3import { SearchBarBaseProps } from './SearchBar';
4import { ThemeProps } from '../config';
5export declare type SearchBarDefaultProps = typeof SearchBar.defaultProps & SearchBarBaseProps & TextInputProps;
6declare type SearchBarState = {
7 isEmpty: boolean;
8};
9declare class SearchBar extends React.Component<SearchBarDefaultProps & Partial<ThemeProps<SearchBarDefaultProps>>, SearchBarState> {
10 input: TextInput;
11 static defaultProps: {
12 value: string;
13 loadingProps: {};
14 showLoading: boolean;
15 lightTheme: boolean;
16 round: boolean;
17 onClear: () => any;
18 onFocus: () => any;
19 onBlur: () => any;
20 onChangeText: () => any;
21 };
22 constructor(props: SearchBarDefaultProps);
23 focus: () => void;
24 blur: () => void;
25 clear: () => void;
26 onFocus: TextInputProps['onFocus'];
27 onBlur: TextInputProps['onBlur'];
28 onChangeText: (text: string) => void;
29 render(): JSX.Element;
30}
31export default SearchBar;