rn-single-multi-deletable-select
Version:
A react native reusable component with 3 options: single select, multi select and deletable items with option to show image and text or just text.
21 lines (18 loc) • 545 B
text/typescript
import {TextStyle, FlatListProps, ViewStyle} from "react-native";
type ListItem = {
name: string;
index: number;
url?: string;
};
type HorizontalSliderProps = {
dataList: ListItem[];
isMultySelection?: boolean;
onPressItem?: (item: ListItem) => void;
onDeleteItem?: (item: ListItem) => void;
isDeletable: boolean;
colorSelected?: string;
colorUnSelected?: string;
textStyle?: TextStyle;
itemContainerStyle?: ViewStyle;
} & Partial<FlatListProps<ListItem>>;
export {ListItem, HorizontalSliderProps};