UNPKG

@oxyhq/services

Version:

OxyHQ Expo/React Native SDK — UI components, screens, and native features

72 lines (71 loc) 2.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(require("react")); var _reactNative = require("react-native"); var _vectorIcons = require("@expo/vector-icons"); var _jsxRuntime = require("react/jsx-runtime"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } const FormInput = /*#__PURE__*/_react.default.memo(({ icon, label, value, onChangeText, placeholder, multiline = false, numberOfLines = 1, testID, colors, styles, borderColor, accessibilityLabel, accessibilityHint }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { style: styles.inputContainer, children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, { style: [multiline ? styles.textAreaWrapper : styles.premiumInputWrapper, { borderColor: borderColor || colors.border, backgroundColor: colors.inputBackground, shadowColor: colors.primary, shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.1, shadowRadius: 12, elevation: 3 }], children: [!multiline && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, { name: icon, size: 22, color: colors.secondaryText, style: styles.inputIcon }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, { style: styles.inputContent, children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, { style: [styles.modernLabel, { color: colors.secondaryText }], children: label }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, { style: [multiline ? styles.textArea : styles.modernInput, { color: colors.text }], value: value, onChangeText: onChangeText, placeholder: placeholder, placeholderTextColor: colors.secondaryText + '60', multiline: multiline, numberOfLines: multiline ? numberOfLines : undefined, testID: testID, accessibilityLabel: accessibilityLabel || label, accessibilityHint: accessibilityHint })] })] }) })); FormInput.displayName = 'FormInput'; var _default = exports.default = FormInput; //# sourceMappingURL=FormInput.js.map