/* * 라벨 + 텍스트 입력 필드 — radius 4, 높이 48(터치 타깃). */ import React from 'react'; import { StyleSheet, Text, TextInput, View, type KeyboardTypeOptions, type TextInputProps, } from 'react-native'; import { colors, radius, touch, type } from '../theme'; interface Props { label?: string; value: string; onChangeText: (v: string) => void; placeholder?: string; secureTextEntry?: boolean; keyboardType?: KeyboardTypeOptions; autoCapitalize?: TextInputProps['autoCapitalize']; helperText?: string; errorText?: string; editable?: boolean; } export function Field({ label, value, onChangeText, placeholder, secureTextEntry, keyboardType, autoCapitalize = 'none', helperText, errorText, editable = true, }: Props) { return ( {label ? {label} : null} {errorText ? ( {errorText} ) : helperText ? ( {helperText} ) : null} ); } const styles = StyleSheet.create({ wrap: { gap: 6 }, label: { fontSize: type.body.fontSize, fontWeight: '600', color: colors.neutral700 }, input: { minHeight: touch.min, borderWidth: 1, borderColor: colors.neutral200, borderRadius: radius.sm, paddingHorizontal: 12, fontSize: type.body.fontSize, color: colors.neutral900, backgroundColor: colors.white, }, helper: { fontSize: type.caption.fontSize, color: colors.neutral500 }, error: { fontSize: type.caption.fontSize, color: colors.error }, });