// @flow import * as React from 'react'; import {Button, Dialog, Paragraph, Portal} from 'react-native-paper'; import {FlatList} from 'react-native'; export type OptionsDialogButtonType = { title: string, icon?: string, onPress: () => void, }; type PropsType = { visible: boolean, title: string, message: string, buttons: Array, onDismiss: () => void, }; class OptionsDialog extends React.PureComponent { getButtonRender = ({item}: {item: OptionsDialogButtonType}): React.Node => { return ( ); }; keyExtractor = (item: OptionsDialogButtonType): string => { if (item.icon != null) { return item.title + item.icon; } return item.title; }; render(): React.Node { const {props} = this; return ( {props.title} {props.message} ); } } export default OptionsDialog;