UNPKG

@td-design/react-native-tabs

Version:

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

31 lines 817 B
import React, { memo } from 'react'; import { Animated, Pressable } from 'react-native'; import { helpers, useTheme } from '@td-design/react-native'; const TabBarItem = _ref => { let { style, labelStyle, title, onLayout, onPress } = _ref; const theme = useTheme(); return /*#__PURE__*/React.createElement(Pressable, { onLayout: onLayout, onPress: onPress, style: [{ paddingHorizontal: theme.spacing.x2, minWidth: 24, height: '100%', alignItems: 'center', justifyContent: 'center' }, style] }, /*#__PURE__*/React.createElement(Animated.Text, { style: [{ fontSize: helpers.px(16), color: theme.colors.black }, labelStyle] }, title)); }; export default /*#__PURE__*/memo(TabBarItem); //# sourceMappingURL=TabBarItem.js.map