react-native-ui-lib
Version:
[](https://stand-with-ukraine.pp.ua)
20 lines (19 loc) • 912 B
TypeScript
/// <reference types="react" />
import type { ViewProps, FlatListProps } from 'react-native';
import { SharedValue } from 'react-native-reanimated';
import type { Dictionary } from '../../typings/common';
import { Data, OrderChangeInfo, SortableListItemProps, SortableListProps } from './types';
export interface SortableListContextType<ItemT extends SortableListItemProps> {
data: Data<ItemT>;
itemsOrder: SharedValue<string[]>;
lockedIds: SharedValue<Dictionary<boolean>>;
onChange: (info: OrderChangeInfo) => void;
itemSize: SharedValue<number>;
horizontal?: FlatListProps<ItemT>['horizontal'];
onItemLayout: ViewProps['onLayout'];
enableHaptic?: boolean;
scale?: number;
itemProps?: SortableListProps<ItemT>['itemProps'];
}
declare const SortableListContext: import("react").Context<SortableListContextType<SortableListItemProps>>;
export default SortableListContext;