import React, {useState} from 'react'; import { Text, TextInput, TouchableOpacity, TouchableWithoutFeedback, View } from 'react-native'; import {PromptStyles} from './PromptStyles'; interface PromptProps { name: string; submit: (value: string | undefined) => void; exit: () => void; backgroundOpacity?: number; } const Prompt = ({name, submit, exit, backgroundOpacity = 0.5}: PromptProps) => { const [text, setText] = useState(); return ( {name} Cancel submit(text)} > OK ); }; export default Prompt;