UNPKG

@oxyhq/services

Version:

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

67 lines (66 loc) 1.92 kB
"use strict"; import React from 'react'; import { View, Text, TextInput } from 'react-native'; import { Ionicons } from '@expo/vector-icons'; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; const FormInput = /*#__PURE__*/React.memo(({ icon, label, value, onChangeText, placeholder, multiline = false, numberOfLines = 1, testID, colors, styles, borderColor, accessibilityLabel, accessibilityHint }) => /*#__PURE__*/_jsx(View, { style: styles.inputContainer, children: /*#__PURE__*/_jsxs(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__*/_jsx(Ionicons, { name: icon, size: 22, color: colors.secondaryText, style: styles.inputIcon }), /*#__PURE__*/_jsxs(View, { style: styles.inputContent, children: [/*#__PURE__*/_jsx(Text, { style: [styles.modernLabel, { color: colors.secondaryText }], children: label }), /*#__PURE__*/_jsx(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'; export default FormInput; //# sourceMappingURL=FormInput.js.map