UNPKG

react-native-wishlist

Version:
49 lines 2.15 kB
import React from 'react'; import { View, ViewProps } from 'react-native'; import { IF } from './Components/IF'; import { Case, Switch } from './Components/Switch'; import { UpdateJob } from './WishlistData'; export declare type WishListInstance<T extends BaseItem> = { scrollToItem: (index: number, animated?: boolean) => void; scrollToTop: () => void; update: (updateJob: UpdateJob<T>) => Promise<unknown>; }; export declare type BaseItem = { type: string; key: string; }; declare type TemplateProps = { type: string; children: React.ReactElement; }; declare function Template({ children, type }: TemplateProps): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null; declare namespace Template { var displayName: string; } export declare const Wishlist: { Component: React.ForwardRefExoticComponent<Pick<ViewProps & { initialData: BaseItem[]; onStartReached?: (() => void) | undefined; onEndReached?: (() => void) | undefined; initialIndex?: number | undefined; } & { ref?: React.Ref<WishListInstance<BaseItem>> | undefined; }, keyof ViewProps | "initialIndex" | "onStartReached" | "onEndReached" | "initialData"> & React.RefAttributes<unknown>>; Template: typeof Template; Pressable: React.ForwardRefExoticComponent<ViewProps & { onPress: (item: any, rootItem: any) => void; } & React.RefAttributes<any>>; View: import("./createTemplateComponent").TemplateComponent<typeof View>; Image: import("./createTemplateComponent").TemplateComponent<typeof import("react-native").Image>; Text: import("./createTemplateComponent").TemplateComponent<typeof import("react-native").Text>; IF: typeof IF; Switch: typeof Switch; Case: typeof Case; /** * TODO(Szymon) It's just a prototype we have to think about matching new and old children * TODO(Szymon) implement setChildren */ ForEach: import("./createTemplateComponent").TemplateComponent<React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<any>>>; }; export {}; //# sourceMappingURL=Wishlist.d.ts.map