Skip to main content

Posts

Showing posts from September, 2021

React Native Alert Modal

 import { Paragraph, Dialog, Portal, Provider } from 'react-native-paper'  const [isOpen, setIsOpen] = React.useState(false)   <SafeAreaView style={styles.container}> <Provider>      <TouchableOpacity style={style.connectionLabel} onPress={() => setIsOpen(true)}>       <Text style={style.connectionText}>{translate('home.connected')}</Text>       </TouchableOpacity>           <View>           <Portal>             <Dialog visible={isOpen} onDismiss={() => setIsOpen(false)}>               <Dialog.Title>Alert</Dialog.Title>               <Dialog.Content>                 <Paragraph>This is simple dialog</Paragraph>         ...