You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
414 B
21 lines
414 B
7 years ago
|
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',
|
||
|
);
|
||
|
});
|
||
|
};
|