lukebrandonfarrell / react-native-navigation-search-bar

React Native Navigation Search Bar with Collapsible Header 🤔It's that simple!
63 stars 12 forks source link

Typings #4

Open trajano opened 2 years ago

trajano commented 2 years ago

Are there TypeScript typings available?

Something like this (just took a stab)

declare module 'react-native-navigation-search-bar' {
  export type RNNSearchBarProps = {
    search?: string;
    componentId: string;
    statusBarHeight: number;
    placeholder?: string;
    onChangeText?: (value: string) => void;
    onSearchButtonPress?: () => void;
    onFocus?: () => void;
    onBlur?: () => void;
    onClear?: () => void;
    onCancel?: () => void;
  };
 declare class RNNSearchBar extends Component<RNNSearchBarProps> {}
}
lukebrandonfarrell commented 2 years ago

@trajano Want to make a PR? Thanks