import { PressableProps, ViewStyle, StyleProp, TextStyle, ActivityIndicatorProps } from 'react-native'; import { Theme } from '../helpers'; import { IconNode } from '../Icon'; import { InputProps } from '../Input'; export type SearchBarAndroidProps = SearchBarBaseProps & { platform?: 'android'; cancelIcon?: IconNode; onCancel?: () => any; onKeyboardHide?: () => any; }; export type SearchBarIosProps = SearchBarBaseProps & { platform?: 'ios'; cancelButtonProps?: Partial & { buttonStyle?: StyleProp; buttonTextStyle?: StyleProp; color?: string; buttonDisabledStyle?: StyleProp; buttonDisabledTextStyle?: StyleProp; }; cancelButtonTitle?: string; showCancel?: boolean; searchIcon?: IconNode; clearIcon?: IconNode; onCancel?: () => any; }; export type SearchBarDefaultProps = SearchBarBaseProps & { platform?: 'default'; lightTheme?: boolean; round?: boolean; }; export interface SearchBarBaseProps extends InputProps { containerStyle?: StyleProp; inputContainerStyle?: StyleProp; clearIcon?: IconNode; searchIcon?: IconNode; inputStyle?: StyleProp; loadingProps?: ActivityIndicatorProps; showLoading?: boolean; leftIconContainerStyle?: StyleProp; rightIconContainerStyle?: StyleProp; onClear?(): void; theme?: Theme; } export type SearchBarProps = SearchBarDefaultProps | SearchBarAndroidProps | SearchBarIosProps;