BlueWallet/prompt.js

21 lines
414 B
JavaScript
Raw Normal View History

2018-03-31 01:03:58 +01:00
import { AlertIOS } from 'react-native';
module.exports = function(title, text) {
return new Promise(function(resolve, reject) {
AlertIOS.prompt(
title,
text,
[
{
text: 'OK',
onPress: password => {
console.log('OK Pressed, password: ' + password);
resolve(password);
},
},
],
'secure-text',
);
});
};