UNPKG

react-native-sortables

Version:

Powerful Sortable Components for Flexible Content Reordering in React Native

21 lines (18 loc) 547 B
"use strict"; export const resolveDimension = (dimension, key) => { 'worklet'; return dimension && (typeof dimension === 'number' ? dimension : dimension[key] ?? null); }; export const getItemDimensions = (key, itemWidths, itemHeights) => { 'worklet'; const itemWidth = resolveDimension(itemWidths, key); const itemHeight = resolveDimension(itemHeights, key); if (itemWidth === null || itemHeight === null) { return null; } return { height: itemHeight, width: itemWidth }; }; //# sourceMappingURL=dimensions.js.map