@td-design/react-native
Version:
react-native UI组件库
13 lines • 606 B
TypeScript
/// <reference types="react" />
import { TextInput } from 'react-native';
import type { SearchBarProps } from '.';
export default function useSearchBar({ autoFocus, defaultValue, onChange, onSearch, }: Pick<SearchBarProps, 'autoFocus' | 'onChange' | 'defaultValue' | 'onSearch'>): {
onFocus: () => void;
onBlur: () => void;
onCancel: () => void;
setKeywords: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
inputRef: import("react").RefObject<TextInput>;
focused: boolean;
keywords: string | undefined;
};
//# sourceMappingURL=useSearchBar.d.ts.map