mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-20 02:09:10 +01:00
28 lines
563 B
JavaScript
28 lines
563 B
JavaScript
import { AlertIOS } from 'react-native';
|
|
|
|
module.exports = (title, text) => {
|
|
return new Promise((resolve, reject) => {
|
|
AlertIOS.prompt(
|
|
title,
|
|
text,
|
|
[
|
|
{
|
|
text: 'Cancel',
|
|
onPress: () => {
|
|
reject(Error('Cancel Pressed'));
|
|
},
|
|
style: 'cancel',
|
|
},
|
|
{
|
|
text: 'OK',
|
|
onPress: password => {
|
|
console.log('OK Pressed, password: ' + password);
|
|
resolve(password);
|
|
},
|
|
},
|
|
],
|
|
'secure-text',
|
|
);
|
|
});
|
|
};
|