UNPKG

@fruits-chain/react-native-xiaoshu

Version:
73 lines (68 loc) 1.82 kB
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } import React, { memo } from 'react'; import Cell from '../cell'; import PasswordInput from '../password-input'; import Theme from '../theme'; /** * Field 密码输入 * @description 表单中的密码输入组件。 */ const FieldPasswordInput = _ref => { let { // TODO 优化属性传递 style, innerStyle, title, titleStyle, titleTextStyle, titleExtra, valueStyle, valueExtra, contentStyle, divider = true, isLink = false, onPressLink, center = false, arrowDirection = 'right', required = false, vertical = false, // TextInput 属性 textAlign = 'right', textInputStyle, textInputBordered, ...restProps } = _ref; if (vertical) { textAlign = 'left'; } const TOKENS = Theme.useThemeTokens(); const cellProps = { style, innerStyle, title, titleStyle, titleTextStyle, titleExtra, valueExtra, contentStyle, divider, isLink, onPressLink, center, arrowDirection, required, vertical }; return /*#__PURE__*/React.createElement(Cell, _extends({}, cellProps, { valueStyle: [valueStyle, vertical ? { marginTop: TOKENS.space_2 } : null], value: /*#__PURE__*/React.createElement(PasswordInput, _extends({}, restProps, { style: textInputStyle, bordered: textInputBordered, textAlign: textAlign })) })); }; export default /*#__PURE__*/memo(FieldPasswordInput); //# sourceMappingURL=field-password.js.map