import { React, ReactNative as RN } from "@vendetta/metro/common"; import { Forms } from "@vendetta/ui/components"; import type { ImageSourcePropType } from "react-native"; import { ActionSheet } from "../ActionSheet"; const { FormRow } = Forms; export default function ChooseSheet({ title, value: _value, options, callback, }: { title: string; value: string | number | boolean | null; options: { name: string; description?: string; value: typeof _value; icon?: ImageSourcePropType; iconColor?: any; iconComponent?: React.ReactNode; }[]; callback: (v: typeof _value) => void; }) { const [value, setValue] = React.useState(_value); return ( {options.map((x) => ( )} leading={} onPress={() => { setValue(x.value); callback(x.value); }} /> ))} ); }