react-native-form-model
Version:
An easily testable and opinionated React Native form model builder written in pure JavaScript.
18 lines (17 loc) • 610 B
TypeScript
import { FormProps } from './Form';
export interface OptionListProps<T = any> extends Omit<FormProps, 'form'> {
title?: string;
items: T[];
selectedIndex?: number;
onSelect?: (item: T, index: number) => void;
formatItem?: (item: T, index: number) => string;
/**
* Text color of the items.
*/
itemColor?: string;
/**
* Color of the item checkmark.
*/
chechmarkColor?: string;
}
export default function OptionList<T = any>({ title, items, selectedIndex, onSelect, formatItem, itemColor, chechmarkColor, style, ...props }: OptionListProps<T>): JSX.Element;