BlueWallet/prompt.js
2018-03-31 14:43:08 +01:00

21 lines
414 B
JavaScript

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',
);
});
};