UNPKG

@fruits-chain/react-native-xiaoshu

Version:
27 lines (25 loc) • 928 B
import React, { memo } from 'react'; import { View } from 'react-native'; import Theme from '../theme'; import { varCreator, styleCreator } from './style'; const StepSelectorLine = _ref => { let { index, total, active = false } = _ref; const TOKENS = Theme.useThemeTokens(); const CV = Theme.createVar(TOKENS, varCreator); const STYLES = Theme.createStyle(CV, styleCreator); return /*#__PURE__*/React.createElement(View, { style: STYLES.line }, index !== 0 ? /*#__PURE__*/React.createElement(View, { style: [STYLES.line_bar, STYLES.line_bar_top] }) : null, /*#__PURE__*/React.createElement(View, { style: [STYLES.line_dot, active ? STYLES.line_dot_active : null] }), index !== total - 1 ? /*#__PURE__*/React.createElement(View, { style: [STYLES.line_bar, STYLES.line_bar_bottom] }) : null); }; export default /*#__PURE__*/memo(StepSelectorLine); //# sourceMappingURL=line.js.map