|
| 1 | +type button; |
| 2 | +[@bs.obj] |
| 3 | +external button: |
| 4 | + ( |
| 5 | + ~text: string=?, |
| 6 | + ~onPress: option(string) => unit=?, |
| 7 | + ~style: [@bs.string] [ | `default | `cancel | `destructive]=?, |
| 8 | + unit |
| 9 | + ) => |
| 10 | + button = |
| 11 | + ""; |
| 12 | + |
| 13 | +[@bs.scope "AlertIOS"] [@bs.module "react-native"] |
| 14 | +external alert: |
| 15 | + (~title: string, ~message: string=?, ~buttons: array(button)=?, unit) => |
| 16 | + unit = |
| 17 | + "alert"; |
| 18 | + |
| 19 | +[@bs.scope "AlertIOS"] [@bs.module "react-native"] |
| 20 | +external alertWithOKButton: |
| 21 | + (~title: string, ~message: string=?, ~callback: unit => unit=?, unit) => unit = |
| 22 | + "alert"; |
| 23 | + |
| 24 | +[@bs.scope "AlertIOS"] [@bs.module "react-native"] |
| 25 | +external prompt: |
| 26 | + ( |
| 27 | + ~title: string, |
| 28 | + ~message: string=?, |
| 29 | + ~buttons: array(button)=?, |
| 30 | + ~_type: [@bs.string] [ |
| 31 | + | `default |
| 32 | + | [@bs.as "plain-text"] `plainText |
| 33 | + | [@bs.as "secure-text"] `secureText |
| 34 | + | [@bs.as "login-password"] `loginPassword |
| 35 | + ] |
| 36 | + =?, |
| 37 | + ~defaultValue: string=?, |
| 38 | + ~keyboardType: [@bs.string] [ |
| 39 | + | `default |
| 40 | + | [@bs.as "number-pad"] `numberPad |
| 41 | + | [@bs.as "decimal-pad"] `decimalPad |
| 42 | + | `numeric |
| 43 | + | [@bs.as "email-address"] `emailAddress |
| 44 | + | [@bs.as "phone-pad"] `phonePad |
| 45 | + | [@bs.as "ascii-capable"] `asciiCapable |
| 46 | + | [@bs.as "numbers-and-punctuation"] |
| 47 | + `numbersAndPunctuation |
| 48 | + | `url |
| 49 | + | [@bs.as "name-phone-pad"] `namePhonePad |
| 50 | + | `twitter |
| 51 | + | [@bs.as "web-search"] `webSearch |
| 52 | + | [@bs.as "visible-password"] `visiblePassword |
| 53 | + ] |
| 54 | + =?, |
| 55 | + unit |
| 56 | + ) => |
| 57 | + unit = |
| 58 | + "prompt"; |
| 59 | + |
| 60 | +[@bs.scope "AlertIOS"] [@bs.module "react-native"] |
| 61 | +external promptWithOKButton: |
| 62 | + ( |
| 63 | + ~title: string, |
| 64 | + ~message: string=?, |
| 65 | + ~callback: string => unit=?, |
| 66 | + ~_type: [@bs.string] [ |
| 67 | + | `default |
| 68 | + | [@bs.as "plain-text"] `plainText |
| 69 | + | [@bs.as "secure-text"] `secureText |
| 70 | + | [@bs.as "login-password"] `loginPassword |
| 71 | + ] |
| 72 | + =?, |
| 73 | + ~defaultValue: string=?, |
| 74 | + ~keyboardType: [@bs.string] [ |
| 75 | + | `default |
| 76 | + | [@bs.as "number-pad"] `numberPad |
| 77 | + | [@bs.as "decimal-pad"] `decimalPad |
| 78 | + | `numeric |
| 79 | + | [@bs.as "email-address"] `emailAddress |
| 80 | + | [@bs.as "phone-pad"] `phonePad |
| 81 | + | [@bs.as "ascii-capable"] `asciiCapable |
| 82 | + | [@bs.as "numbers-and-punctuation"] |
| 83 | + `numbersAndPunctuation |
| 84 | + | `url |
| 85 | + | [@bs.as "name-phone-pad"] `namePhonePad |
| 86 | + | `twitter |
| 87 | + | [@bs.as "web-search"] `webSearch |
| 88 | + | [@bs.as "visible-password"] `visiblePassword |
| 89 | + ] |
| 90 | + =?, |
| 91 | + unit |
| 92 | + ) => |
| 93 | + unit = |
| 94 | + "prompt"; |
0 commit comments