import React, { forwardRef } from "react"; import { Select as BaseSelect } from "tamagui"; export type SelectItem = { label: string; value: string; }; type SelectProps = React.ComponentPropsWithoutRef & { items?: SelectItem[] | null; value?: string; defaultValue?: string; onChange?: (value: string) => void; placeholder?: string; }; type SelectRef = React.ElementRef; const Select = forwardRef( ( { items, value, defaultValue, onChange, placeholder = "Select...", ...props }, ref ) => { return ( {placeholder} {items?.map((item, idx) => ( {item.label} ))} ); } ); export default Select;