UNPKG

@td-design/react-native-tabs

Version:

基于 @td-design/react-native 的 tabs 组件

31 lines 735 B
import React, { memo } from 'react'; import { Animated, StyleSheet } from 'react-native'; import { useTheme } from '@td-design/react-native'; function TabBarIndicator(_ref) { let { style, scrollX } = _ref; const theme = useTheme(); return /*#__PURE__*/React.createElement(Animated.View, { key: "indicator", style: [{ backgroundColor: theme.colors.primary200 }, styles.indicator, style, { transform: [{ translateX: scrollX }] }] }); } export default /*#__PURE__*/memo(TabBarIndicator); const styles = StyleSheet.create({ indicator: { position: 'absolute', left: 0, bottom: 0, height: 4, borderRadius: 2 } }); //# sourceMappingURL=TabBarIndicator.js.map