import React from "react"; import { View, Text, StyleSheet } from "react-native"; import { Picker as RNPicker } from "@react-native-picker/picker"; interface PickerProps { label: string; value: string; onValueChange: (value: string) => void; items: { label: string; value: string }[]; error?: string; } export function Picker({ label, value, onValueChange, items, error }: PickerProps) { return ( {label} {items.map((item) => ( ))} {error && {error}} ); } const styles = StyleSheet.create({ container: { marginBottom: 16, }, label: { fontSize: 14, fontWeight: "600", color: "#374151", marginBottom: 8, }, pickerWrapper: { backgroundColor: "white", borderWidth: 1, borderColor: "#e5e7eb", borderRadius: 8, overflow: "hidden", }, pickerError: { borderColor: "#ef4444", }, picker: { height: 50, }, errorText: { fontSize: 12, color: "#ef4444", marginTop: 4, }, });