UNPKG

@fruits-chain/react-native-xiaoshu

Version:
28 lines (27 loc) • 961 B
"use strict"; import React, { memo } from 'react'; import { View } from 'react-native'; import Theme from "../theme/index.js"; import { varCreator, styleCreator } from "./style.js"; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; const StepSelectorLine = ({ index, total, active = false }) => { const TOKENS = Theme.useThemeTokens(); const CV = Theme.createVar(TOKENS, varCreator); const STYLES = Theme.createStyle(CV, styleCreator); return /*#__PURE__*/_jsxs(View, { style: STYLES.line, children: [index !== 0 ? /*#__PURE__*/_jsx(View, { style: [STYLES.line_bar, STYLES.line_bar_top] }) : null, /*#__PURE__*/_jsx(View, { style: [STYLES.line_dot, active ? STYLES.line_dot_active : null] }), index !== total - 1 ? /*#__PURE__*/_jsx(View, { style: [STYLES.line_bar, STYLES.line_bar_bottom] }) : null] }); }; export default /*#__PURE__*/memo(StepSelectorLine); //# sourceMappingURL=line.js.map