import { LinearGradient } from '@tamagui/linear-gradient' import { Check, ChevronDown, ChevronUp } from '@tamagui/lucide-icons' import { useFieldInfo, useTsController } from '@ts-react/form' import { useId } from 'react' import { Adapt, Fieldset, Label, Select, SelectProps, Sheet, Theme, XStack, YStack, getFontSize, isWeb, } from 'tamagui' import { FieldError } from '../FieldError' import { Shake } from '../Shake' type SelectItem = { value: string name: string } export const SelectField = ({ options, native = true, ...props }: { options: SelectItem[] } & Pick) => { const { field, error, formState: { isSubmitting }, } = useTsController() const { label, isOptional } = useFieldInfo() const id = useId() const disabled = isSubmitting return (
{!!label && ( )}
) }