react-native-collapsible-tab-view
Version:
Collapsible tab view component for React Native
23 lines (20 loc) • 771 B
JavaScript
;
import { FlatList, Platform, SectionList, I18nManager } from 'react-native';
import Animated, { scrollTo } from 'react-native-reanimated';
/** The time one frame takes at 60 fps (16 ms) */
export const ONE_FRAME_MS = 16;
/** check if app is in RTL mode or not */
export const {
isRTL
} = I18nManager;
export const IS_IOS = Platform.OS === 'ios';
export const AnimatedFlatList = Animated.createAnimatedComponent(FlatList);
export const AnimatedSectionList = Animated.createAnimatedComponent(SectionList);
export function scrollToImpl(ref, x, y, animated) {
'worklet';
if (!ref) return;
// ensure we don't scroll on NaN
if (!Number.isFinite(x) || !Number.isFinite(y)) return;
scrollTo(ref, x, y, animated);
}
//# sourceMappingURL=helpers.js.map